简体   繁体   中英

Target body with sibling

I have a HTML page with contents (div, h1, ...). With interaction on one of these contents I would like to affect my body. I look at ~ and + sibling symbol for CSS but without success.

Is there a way to achieve what I want to do ?

CSS provides nothing that allows you to modify an element based on its children or elements that follow it.

You'll need to look to JavaScript for that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM