IOS下:active无效
IOS下:active无效,是因为该元素没有绑定touch事件。因此在IOS系统的移动设备中,需要在按钮元素或body/html上绑定touchstart/touchend绑定一个空的匿名函数即可
<script>
var a=document.getElementsByTagName('a');
for(var i=0;i<a.length;i++){
a[i].addEventListener('touchstart',function(){},false);
}
</script>

浙公网安备 33010602011771号