移动端ios下H5的:active样式失效的解决方法

在body上绑定一个touchstart事件,空函数就行:

1 document.body.addEventListener('touchstart', function(){}, false)

或者在body标签上加上ontouchstart=""也可以:

<body ontouchstart="">

  

猜你喜欢

转载自www.cnblogs.com/tyson/p/9194866.html