Css When Click Select Another Class With Code Examples

PHOTO EMBED

Thu Nov 24 2022 15:21:53 GMT+0000 (Coordinated Universal Time)

Saved by @danlourenco #css

// If the cube is directly inside the container:
#container:hover > #cube { background-color: yellow; }
// If cube is next to (after containers closing tag) the container:
#container:hover + #cube { background-color: yellow; }
// If the cube is somewhere inside the container:
#container:hover #cube { background-color: yellow; }
// If the cube is a sibling of the container:
#container:hover ~ #cube { background-color: yellow; }
content_copyCOPY

https://www.folkstalk.com/tech/css-when-click-select-another-class-with-code-examples/