按钮和锚点标记悬停&在Iphone中无法在Chrome上运行

问题描述 投票:0回答:1

桌面:当您将鼠标悬停在按钮或锚点链接中时,背景颜色会发生变化。移动:悬停或活动不会更改背景颜色。

.btn {
 background: transparent;
 color: #000;
}
.btn:hover,
.btn:active {
 background: #bf0;
 color: #fff;
}
ios css google-chrome mobile
1个回答
0
投票

这段代码解决了我的问题

 document.addEventListener("touchstart", function(){}, true)
© www.soinside.com 2019 - 2024. All rights reserved.