CSS - 滚动一个元素,并使另一个元素可见 [英] CSS - Rollover one element, and make another element visible
本文介绍了CSS - 滚动一个元素,并使另一个元素可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在CSS中,是否有可能当我滚动一个元素时,我使另一个元素可见?我有一个图标,当有人将鼠标悬停在它上面时,我想让它显示一个描述该图标的文本元素。
In CSS, is it possible that when I rollover one element, I make another element visible? I have an icon, and when someone mouses over it, I want it to make visible a text element that describes what the icon does.
推荐答案
这里是一个CSS的工具提示我使用所有的时间:)工作伟大,即使在IE。
Here's a CSS only tooltip I use all the time :) Works great, even in IE.
a:hover {
background:#ffffff;
text-decoration:none;
}
/*BG color is a must for IE6*/
a.tooltip span {
display:none;
padding:2px 3px;
margin-left:8px;
width:130px;
}
a.tooltip:hover span{
display:inline;
position:absolute;
background:#ffffff;
border:1px solid #cccccc;
color:#6c6c6c;
}
Easy
<a class="tooltip" href="#">
Tooltip
<span>T his is the crazy little Easy Tooltip Text.
</span>
</a>
希望它有帮助。
这篇关于CSS - 滚动一个元素,并使另一个元素可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文