“CSS WIVER Измените другой элемент” Ответ

Как изменить еще один элемент на пари

// 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; }
Rohan

CSS Hover влияет на другой предмет

#container:hover ~ #cube { background-color: yellow; }
Tense Tarantula

CSS Hover меняет другой элемент

#a:hover ~ #b {
    background: #ccc
}

<div id="a">Div A</div>
<div>random other elements</div>
<div>random other elements</div>
<div>random other elements</div>
<div id="b">Div B</div>
Modern Mouse

CSS WIVER Измените другой элемент

#container:hover > #cube { background-color: yellow; }
Elated Elephant

CSS Hover меняет другой элемент

#a:hover + #b {
    background: #ccc
}

<div id="a">Div A</div>
<div id="b">Div B</div>
Modern Mouse

Ответы похожие на “CSS WIVER Измените другой элемент”

Вопросы похожие на “CSS WIVER Измените другой элемент”

Больше похожих ответов на “CSS WIVER Измените другой элемент” по CSS

Смотреть популярные ответы по языку

Смотреть другие языки программирования