C.Ronaldo C.Ronaldo - 1 year ago 45
CSS Question

Change css from sibling when hovered on with SCSS

I want to change the css from the sibling when I hover on the element. Is there a way to do this with SCSS?

Example: https://jsfiddle.net/rqb5ytav/

Like when I hover on

how do I change the background color of

Answer Source

Use + CSS selector. It's available from CSS2.

.one:hover + .two {

Please look at the fiddle: https://jsfiddle.net/rqb5ytav/1/.