, the style is applied as expected.
Adding a general sibling selector, such as:
div:hover ~ div {}
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;
}
}
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!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn