【问题标题】:How can i fix the issue of anchor attribute in safari如何解决 Safari 中的锚属性问题
【发布时间】:2018-09-11 16:12:11
【问题描述】:

我的锚标记有问题。我在我的网站中使用 619-618-1660,问题是当我在 safari 浏览器或 iPhone 上查看我的网站时,写入的文本 (href="tel:619 -618-1660") 正在显示。您可以在下面的链接中查看图像。

【问题讨论】:

标签: php wordpress html css


【解决方案1】:

将此元标记添加到您的 html 的顶部

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

以前问过here

【讨论】:

  • 有趣。不过,最好将 CSS 规则应用于生成的链接以使它们看起来正确,而不是关闭有时有用的功能。
  • 同意。 @ceejayoz
【解决方案2】:

问题已解决,有一个名为 print.css 的文件包含此代码。

body{background:white !important;color:black !important;}#nav,#sidebar,.sidebar,#skip{display:none;}#content{width:100%;float:none;background:transparent ;}a:not(.logo a){font-weight:bold;text-decoration:underline;color:#06c;}a:not(.logo a):after{content:" [" attr(href) " ] ";}p{font-size:14px;}#printOnlyMessage{display:block !important;}

在这个产生错误的代码中是

a:not(.logo a):after{content:" [" attr(href) "] ";}

所以我删除了这段代码,错误就解决了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-12-17
    • 2021-08-07
    • 1970-01-01
    • 2020-07-30
    • 1970-01-01
    • 1970-01-01
    • 2012-04-23
    • 1970-01-01
    相关资源
    最近更新 更多