假设我们有:
<a id="link" href="#" title="i am the title">link</a>
Run Code Online (Sandbox Code Playgroud)
有没有办法使用CSS来大写 "我是标题"文本默认显示在鼠标悬停上?
当我使用<abbr>元素时,我通常在缩写下添加一个虚线边框,表示有更多信息可用:

工具提示需要大约两秒才能显示*,并且由于它不是即时的,因此用户点击文本似乎很自然(特别是因为它看起来类似于链接).
但是,如果工具提示已经可见,则单击该缩写会隐藏工具提示,并防止它在尚未显示时出现.
有没有办法防止这种点击行为?
我没有运气地尝试了明显的事情:
$('abbr').on('click', function(e) { e.preventDefault(); });
Run Code Online (Sandbox Code Playgroud)
(*) - Chrome中为2秒,Firefox中约为1秒
我正在使用jquery.fancybox打开图像模式.我注意到如果我使用title属性可以进行描述.
当我使用长描述时,所有文本只显示在一行中.是什么让文本的某些部分消失了.
如何将标题设置为段落?
我试图改变显示:inline-block的,以显示:块和应用一些宽度的替代品,但没有奏效.
HTML
<div id="carousel" class="es-carousel-wrapper" ng-controller="myCtrl">
<div class="es-carousel">
<ul>
<li>
<figure class="img-rounded">
<a class="view magnifier" data-fancybox-group="gallery" href="images/publishing/labirintite.jpg" title="{{text}}">
<img src="images/publishing/labirintite300x189.jpg" alt="Labirintite" />
<span></span>
</a>
</figure>
</li>
</ul>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
.fancybox-title {
visibility: hidden;
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
position: relative;
text-shadow: none;
z-index: 8050;
}
.fancybox-opened .fancybox-title {
visibility: visible;
}
.fancybox-title-float-wrap {
position: absolute;
bottom: 0;
right: 50%;
margin-bottom: -35px;
z-index: 8050;
text-align: center;
}
.fancybox-title-float-wrap .child {
display: inline-block;
margin-right: …Run Code Online (Sandbox Code Playgroud) 使用 HTML 和 CSS,而不是 JS,如何更改在链接悬停时显示的标题文本的位置、文本颜色和背景颜色?我想将标题文本居中在链接文本的中点下方。
a:link {text-decoration: none;
color: #000;
border-bottom: 2px solid #f00; }
a:hover, a:active
{text-decoration: none;
color: #f00;
border-bottom: 2px solid #f00; }
a:visited {text-decoration: none;
color: black;
border-bottom: 2px solid #888; }Run Code Online (Sandbox Code Playgroud)
<div>
<a href="#" title="hello">text</a>
</div>Run Code Online (Sandbox Code Playgroud)