affect other class when one is hover css code example Example: css affect other elements on hover #container:hover ~ #cube { background-color: yellow; }