, the style is applied as expected.
Adding a general sibling selector, such as:
div:hover ~ div {}
Copy after login
regardless of whether a style is declared, resolves the issue.
A workaround for this Webkit bug is to fake animation on the body element:
body {
-webkit-animation: bugfix infinite 1s;
}
@-webkit-keyframes bugfix {
from {
padding: 0;
}
to {
padding: 0;
}
}
Copy after login
This can be seen in action here: https://jsfiddle.net/jalbertbowdenii/ds2yY/1/.
The above is the detailed content of Why Doesn\'t :hover Work Properly with Adjacent-Sibling Selectors in Webkit Browsers?. For more information, please follow other related articles on the PHP Chinese website!