ahref - 隐藏选择颜色
我在 iPhone 应用程序中使用了一些 HTML。我对 HTML 不太了解。
当我们触摸任何超链接(HTML 中的 ahref)时,包含 ahref 的“li”中会出现蓝色选择颜色。我们怎样才能禁用它?
I am using a bit of HTML in my IPhone application. I don't have much idea about HTML.
When we touch any hyperlink(ahref in HTML) there is a blue selection color that appears in "li" which contains ahref. How can we disable it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过 css 指定链接的自定义颜色来覆盖该行为:
或者根据其状态(例如活动、单击等):
You can override the behaviour by specifying your custom color for links via css:
Or based on their status eg active, clicked, etc:
我不是 100% 确定,但如果文本确实被选择,并且您看到蓝色,那么解决方法是应用如下样式:
只有当它确实是正在发生的选择时。请注意,只有
::selection
以及:-webkit-selection
可能适用于 iPhone。::-moz-selection
适用于 Firefox 浏览器。I'm not 100% sure, but if the text is truly being selected, and you're seeing a blue color, then the fix would be to apply a style like this:
That's only if it truly is a selection that's occuring. Mind you, only the
::selection
and maybe the:-webkit-selection
could possibly apply to an iPhone.::-moz-selection
would be for a Firefox browser.