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

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

Simple file compression in C -

php - Sorting an multidimension array using usort fails -