IOS手机伪类a:active失效

IOS手机伪类a:active失效:点击更改颜色,松开恢复

解决方案:OS系统的移动设备中,需要在按钮元素或body/html上绑定一个touchstart事件才能激活:active状态

document.body.addEventListener('touchstart', function () { //...空函数即可});

 

posted @ 2019-09-17 10:12  我爱小明  阅读(309)  评论(0编辑  收藏  举报