首页 > 移动平台 > 详细

ios伪类active兼容问题

时间:2020-04-08 17:22:40      阅读:83      评论:0      收藏:0      [点我收藏+]

在iOS系统的移动设备中,需要在按钮元素或body/html标签上绑定一个touchstart事件才能激活:active状态。比如:

<body ontouchstart="">
...
</body>

或者js给 document 绑定 touchstart 或 touchend 事件:

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

对于PC端,将touchstart换成mouseover即可。

ios伪类active兼容问题

原文:https://www.cnblogs.com/shemingxin/p/12660224.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!