Is there a method to “passively” (with CSS only) change the body’s background when a “hover”-event is detected on a element on the page?
Something like
body div:hover which would trigger the body’s background-image
I’d like to do this that way because I have no idea of coding but run a wordpress-site…
Sorry David in CSS you can’t get a handle upwards only in a cascading direction downwards. You’ll need to script this.
There are no CSS parent selectors, but you may be able to achieve your goal by using a fixed-position
div
with a negativez-index
, which is a sibling of the hovered element:Fiddle