【问题标题】:Why doesn't the title of a link show when using a <strong> tag inside it为什么在其中使用 <strong> 标记时不显示链接的标题
【发布时间】:2015-07-19 22:22:13
【问题描述】:

代码

这是 HTML 代码:

<li>
  <a href="./hacks/hacks.html" title="Break the rules with techniques, not malicious invasion into computer and destroy the computer network.">
    <strong>HACKS</strong>
  </a> -
  <em>Break the rules with techniques, not malicious invasion into computer and destroy the computer network.</em>
</li>

问题

问题是当我将鼠标放在链接上时,标题用技术打破规则,而不是恶意入侵计算机并破坏计算机网络。)不会出现。当我删除 HACKS 之间的&lt;strong&gt;&lt;/strong&gt; 时,它可以工作。 (IE 10

截图

  • 屏幕截图 - 在没有 &lt;strong&gt;&lt;/strong&gt; [title-works-without-strong] 的情况下在 IE 10 中工作
  • 屏幕截图 - 在带有 &lt;strong&gt;&lt;strong&gt; 的 IE 10 中不起作用

在我将浏览器更改为 Chrome 27 后,标题 起作用了。

各位,有什么解释吗?

【问题讨论】:

    标签: html internet-explorer google-chrome


    【解决方案1】:

    将强者移出锚点怎么样:

    <li>
      <strong><a href="./hacks/hacks.html" title="Break the rules with techniques, not malicious invasion into computer and destroy the computer network.">
        HACKS
      </a></strong> -
      <em>Break the rules with techniques, not malicious invasion into computer and destroy the computer network.</em>
    </li>
    

    在 IE7 上测试

    【讨论】:

    • 现在试着把标题给强者。它没有。 :)
    • 普拉文是什么意思?如何给强者冠名?
    【解决方案2】:

    这样说吧。

    <a href="..hacks\hack.html">PUT YOUR TITLE HERE</a>
    

    你不需要像你一样的标题标签。将链接的标题放在 a 标签和 end a 标签之间。 希望有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-22
      • 1970-01-01
      • 2015-09-08
      • 1970-01-01
      • 2021-02-28
      • 1970-01-01
      • 2022-11-12
      • 1970-01-01
      相关资源
      最近更新 更多