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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -