问题出现原因
https://developer.mozilla.org/en-US/docs/Web/CSS/:active 上关于该伪类有如下说明:
[1] By default, Safari Mobile does not use the :active state unless there is a touchstart event handler on the relevant element or on the <body>
.
问题解决方案
- css
<body ontouchstart=""></body>
- js
<script> document.body.addEventListener('touchstart',function(){},false);</script>