空href不显示为链接

空href不显示为链接

问题描述:

我不是程序员,所以这可能是非常混乱。也许有更清晰的方法来创建鼠标悬停弹出窗口?空href不显示为链接

我使用空href在弹出窗口上创建鼠标。我的问题是,空href不显示为链接,所以没有迹象表明应该鼠标悬停。

(<a href=" " title="Infrastructure, comprising a society's ... , and science (symbolic and ideational relations)."></a><span title="Infrastructure, comprising a society's ... , and science (symbolic and ideational relations)."><i>'Infrastructural, Structural and Superstructural'</i></span> 

我也试过了:javascript:void(0); JavaScript的:;和#(都无济于事);我终于以斜体结算 - 但这不是真正的暗示。

+1

为什么你希望它看起来像一个链接,如果它不是(真正的)链接?它的可用性很差。 – 2014-12-11 07:06:59

If you just want the pop-over title, you can put that on any element而不必使用空的(和非语义的)a链接。

另外,考虑到您的a标记为空,将不会显示任何内容,因此不会显示任何链接。

如果我明白你想要做的正确,我认为你的标签应该围绕文本。

<a href="#" title="Infrastructure, comprising a society's ... , and science (symbolic and ideational relations)."><span title="Infrastructure, comprising a society's ... , and science (symbolic and ideational relations)."><i>'Infrastructural, Structural and Superstructural'</i></span></a> 

你接近 - 但你要知道,<a href='...'>打开标签和</a>关闭它。这两者之间的文字是显示下划线的位。

<a href="#" title="Blah de blah blah">Blah</a> 

或...

<span style="color:blue" title="The definition of the term">the term used</span> 
+0

是的。谢谢。对我而言,错误地放置标签是一个疏忽。顺便说一句,如果您使用 skeptic 2014-12-11 01:36:05