移动端的:active 伪类在iOS上没有效果的问题。
-:active伪类常用于设定点击状态下激活的样式 。
-:link — :visited — :hover — :active 定义顺序也是有必要熟记的。不懂的自行百度一下。
fixed
图片描述" title="图片描述">
Safari Mobile does not use the :active state unless there is a touchstart event handler on the relevant element or on the body
英语专八翻译(冷漠脸):Safari移动不使用:活跃状态,除非有对相关元素或对body绑定一个touchstart事件处理程序
document.body.addEventListener('touchstart',function () {});