我有一个文本,它在悬停时在其他地方显示另一个(否则隐藏)文本,如下所示:
HTML
<div class="design">hover me<span>to show this</span></div>
CSS
.design {
position: absolute;
z-index: 2;
color: #404040;
}
.design:hover {
cursor: pointer;
}
.design span {
position: absolute;
display: none;
}
.design:hover span {
display: block;
top: 47px;
left: 45px;
font-family: Arial;
font-size: 13px;
color: #000;
}
如何将过渡效果应用于根据悬停隐藏或显示的文本?显然与andtransition
冲突,但 using似乎也不起作用。display:none
:block
visibility
编辑:jsFiddle - http://jsfiddle.net/vwsgJ/