gpt4 book ai didi

ios - 删除在 ios safari/chrome/firefox 中单击的链接上的灰色背景

转载 作者:IT王子 更新时间:2023-10-29 07:33:32 33 4
gpt4 key购买 nike

当您在适用于 iOS 的 Safari(或 chrome 或 firefox)中单击(触摸)链接时,链接后面会出现灰色背景(仅当您按住它时)。有没有办法使用 CSS 删除此功能?

请看下面的示例图片:

enter image description here

最佳答案

Webkit 有一个特定的样式属性:-webkit-tap-highlight-color

复制自:http://davidwalsh.name/mobile-highlight-color

/* light blue at 80% opacity */
html {
-webkit-tap-highlight-color: rgba(201, 224, 253, 0.8);
}

/* change it for a div that has a similar background-color to the light blue tap color */
.blueDiv {
-webkit-tap-highlight-color: rgba(251, 185, 250, 0.9);
}

如果你想完全去除高亮——

.myButton {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

关于ios - 删除在 ios safari/chrome/firefox 中单击的链接上的灰色背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11885161/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com