【问题标题】:IE color issue with phone number structure电话号码结构的IE颜色问题
【发布时间】:2020-03-29 23:09:31
【问题描述】:

我遇到了一个问题,可能看起来很愚蠢

这是链接

 <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p style="color:#fff">P: 888/987-1144</p>

</body>
</html> 

所以在 IE 11 中数字的颜色是蓝色的。当尝试使用内联 css 时,我想更改它。不影响。

有什么帮助吗?

【问题讨论】:

    标签: html css internet-explorer cross-browser


    【解决方案1】:

    尝试添加这个。

       <meta name="format-detection" content="telephone=no"/>
    

    【讨论】:

      【解决方案2】:

      我相信浏览器正在应用自己的样式,因为它与电话号码的模式相匹配,使其可被电话点击。

      这篇文章涵盖了它: Remove Microsoft Edge's phone number styling

      【讨论】:

        【解决方案3】:

        用户可以使用以下方法在 Microsoft Edge 浏览器中禁用电话号码检测:

        • 禁用整个文档的电话号码检测。添加:

        <meta name="format-detection" content="telephone=no"/>
        

        • 对特定有问题的内容禁用电话号码检测:

        <p x-ms-format-detection="none" style="color:#fff">P: 888/987-1144</p>
        

        更多详情请查看Phone number format recognition

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-07-18
          • 2011-05-30
          • 2014-05-10
          • 2017-10-10
          • 1970-01-01
          • 2013-04-01
          相关资源
          最近更新 更多