active 伪类在iOS上无效的兼容

前端之家收集整理的这篇文章主要介绍了active 伪类在iOS上无效的兼容前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

移动端的:active 伪类在iOS上没有效果的问题。

-:active伪类常用于设定点击状态下激活的样式 。
-:link — :visited — :hover — :active 定义顺序也是有必要熟记的。不懂的自行百度一下。

fixed
<a href=图片描述" 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 () {}); 

猜你在找的程序笔记相关文章