There is no combinator that allows you to select all the other siblings of another element. Atomically, you represent this with .box:not(:hover) , as shown in other answers, but you cannot select all the other .box:not(:hover) elements relative to the .box:hover element in the same parent.
You can do this in part using the sibling + and ~ compilers, but they will only look at the siblings following the element:
.box:hover ~ .box { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -o-filter: grayscale(100%); -ms-filter: grayscale(100%); filter: grayscale(100%); }
This means that if you move the 2nd box, then only the 3rd and 4th boxes will be gray, but not the 1st.
Unable to select previous siblings using CSS. Currently, the only way to achieve what you want is to use JavaScript to switch your styles to other fields when a certain window hangs.
source share