P
P
Pavel2020-01-27 18:32:57
Sass
Pavel, 2020-01-27 18:32:57

How to make selection of siblings elements using scss?

There are 3 (siblings) blocks, how can I make it so that when you hover over the first and third blocks, something changes in the third? Here is a jsfiddle example Tried to restrict via .not(.second-container) but doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2020-01-27
@sidiqi

.first-container:hover ~ .third-container,
.third-container:hover {
  background-color: red;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question