IOS手机伪类a:active失效

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

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

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

猜你喜欢

转载自www.cnblogs.com/ilovexiaoming/p/11531956.html