我想要一个 <div>
当您触摸它时,它会慢慢改变其背景颜色。
我正在使用 :active
伪类:
div {
background: #fff;
transition: all .3s linear;
-o-transition: all .7s linear;
-moz-transition: all .7s linear;
-webkit-transition: all .7s linear;
}
div:active {
background: #E5CC00;
}
在 Chrome 上完美运行,但不适用于 PhoneGap/Android。我也试过 :hover
.
有什么想法吗?
最佳答案
:active 伪类不适用于 Android 上的 div 标签。它确实适用于 anchor 标记。查看这个 StackOverflow 答案:
How to simulate :active css pseudo class in android on non-link elements?
关于android - :active doesn't work on PhoneGap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8356648/