Safari and Chrome, as well as Opera and Firefox, can handle the :hover
pseudo-class and adjacent-sibling selectors:
a:hover + div {}
This works.
However, when another adjacent-sibling is added:
div:hover + a + div {}
Webkit falls apart.
However, if you first hover over <a>
and then hover over the <div>
the style is applied as it ought to.
I'm further confounded, because if you add:
div:hover ~ div {}
with or without a style declared, it starts working as it ought to.
Demo
I see this problem in:
for OS X.
Any ideas?
you can overcome Webkit's pseudo classes + general/adjacent sibling selectors bugs by faking animation on the body element:
body { -webkit-animation: bugfix infinite 1s; }
@-webkit-keyframes bugfix {
from { padding: 0; }
to { padding: 0; }
}
you can check it out here: http://jsfiddle.net/jalbertbowdenii/ds2yY/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With