Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Use :hover to target another element Reply To: Use :hover to target another element

#156859
singlexyz
Participant

you can use the “+” or “~” selector to choose the element after current;

like this html

input b b

input:checked + b will take the element after input when it :checked(just one)

input:checked ~ b will take all the element after input when it :checked.

check the demo: http://codepen.io/anon/pen/lywAp

bad english, hope you can understand.