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>
转载于:https://www.cnblogs.com/shifan/p/5582919.html
相关资源:JAVA上百实例源码以及开源项目