+
96
-

回答

a:hover 设置的样式在ios系统的浏览器内显示不出来,看来在iOS系统的移动设备中,需要在按钮元素或body/html上绑定一个touchstart事件才能激活:active状态。

代码如下:

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

或者给body添加ontouchstart

<body ontouchstart>

网友回复

我知道答案,我要回答