css - Selecting multiple divs in html -
How can we hover over multiple divs in html at the same time?
I have two devices, different posts in an html page.
I want to hover to select any divs and this, and other div.
How can I accomplish this by using the preferences of CSS properties? At present, it is not going from parent to child, on the contrary, I tried all different combinations, even ~ and + properties.
HTML Code:
& lt; Div id = one1 & gt; & Lt; Div id = two2 & gt; & Lt; / Div & gt; & Lt; / Div & gt; CSS:
# one1: hover {background-color: yellow;} # two2: hover {background-color: yellow;}
Would you like to do something like #one: hover ~ #two, #one: hover ~ #three {background-color: yellow; }
Comments
Post a Comment