【问题标题】:One anchor tag not working, similar anchor tags working一个锚标签不工作,类似的锚标签工作
【发布时间】:2016-07-31 05:56:12
【问题描述】:

我有一个 <li> 元素,其中包含 3 个非常相似的锚标记。前两个工作正常,但第三个没有:它确实在hover 上改变了颜色,但它不可点击。这种行为与 Google Chrome、Firefox 和 IE11 类似,因此可能不是浏览器。我有很多类似的页面,以前从未遇到过此类问题。

LIVE 页面是hereCTRL + End 将您带到最后的评论,最后的<a> 是问题所在。

本节的底层 HTML 是

<ul id='commentul'>
  <li>
    <img alt='' src='http://1.gravatar.com/avatar/72f74d7bd6a20a2f9dd37e6af9d45850?s=80&#038;d=mm&#038;r=g' srcset='http://1.gravatar.com/avatar/72f74d7bd6a20a2f9dd37e6af9d45850?s=160&amp;d=mm&amp;r=g 2x' class='avatar avatar-80 photo' height='80' width='80' />	<h3>By Eszter Babarczy on July 30th, 2016</h3>
    <p>Hi! I ran the dialogue with 21 variables using their names. The program insists these are string variables (although they are set to scale). What am I doing wrong? Thanks a lot in advance!</p>
  </li><!-- #comment-## -->
  <li>
    <img alt='' src='http://0.gravatar.com/avatar/3bd63d9e0384df2d2e5cc82890712aaa?s=80&#038;d=mm&#038;r=g' srcset='http://0.gravatar.com/avatar/3bd63d9e0384df2d2e5cc82890712aaa?s=160&amp;d=mm&amp;r=g 2x' class='avatar avatar-80 photo' height='80' width='80' />	<h3>By <a href='http://www.spss-tutorials.com/about-us/' rel='nofollow'>Ruben Geert van den Berg</a> on July 31st, 2016</h3>
    <p>Hi Eszter!</p>
    <p>Try and run <a href="http://www.spss-tutorials.com/spss-descriptives-command/" rel="nofollow">DESCRIPTIVES</a> on all relevant variables. SPSS will (rightfully) refuse to generate descriptives for string variables and throw a warning.</p>
    <p>Now, in SPSS, you can have string variables set to scale. It doesn't make sense, though. "Scale" in SPSS means that you're dealing with a metric variable (the <a href="http://www.spss-tutorials.com/measurement-levels/">measurement level</a> is interval or ratio). </p>
    <p>The defining characteristic of metric variables is that numeric calculations (sum, mean) are meaningful for them and such calculations are not possible on string variables. So we usually see that "scale" is only used for numeric variables whereas all string variables are set to nominal but perhaps this doesn't hold for your data.</p>
    <p>A tiny example illustrating this point is <a  href="http://www.spss-tutorials.com/spss-syntax-examples/no-descriptives-for-metric-string-variable.html">No Descriptives for Metric String Variable</a>. If that doesn't hold for your data, please get back at me, ok?</p>
  </li><!-- #comment-## -->
</ul><!-- id='commentul'> -->

【问题讨论】:

  • 那个是当前页码,其实是span,不是href。

标签: html hyperlink anchor


【解决方案1】:

在最后一个锚点a 中,标签内有一个&amp;nbsp;,如下所示:&lt;a &amp;nbsp;href="..."

删除它,它会工作

【讨论】:

  • 谢谢哥们!!我在 Google Chrome 的源代码中没有看到 &amp;nbsp;。但是,我删除了 Wordpress UI 中的(单个)空格,然后将其放回并更新了评论。这解决了问题 - 虽然我仍然没有真正看到事情是如何首先出错的。
猜你喜欢
  • 1970-01-01
  • 2016-05-14
  • 1970-01-01
  • 1970-01-01
  • 2011-08-03
  • 2010-11-10
  • 2016-03-15
相关资源
最近更新 更多