0
好的。我有一個CSS如果發生溢出,則在懸停時移除課程
.rel{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
-moz-binding: url('ff.xml#rel');
width: 460px;
line-height: 15px;
border-top:dotted 1px #dfdfdf;
}
.rel:hover{
overflow:inherit;
white-space: inherit;
}
.rel:hover .rel_source{
display: none;
}
我的HTML是
<div >
<div class="rel">
<a href="http://feedproxy.google.com/~r/HeraldSunNationalNews/~3/N89EJIdwe9E/story-e6frf7l6-1226207160923">Julia Gillard's anti-wrinkle anti- sadsad anti-wrinkle poasdsadasdasdasasdsd</a>
<div class="rel_source" style="line-height:15px"> Herald Sun | <span class="cat_red">1d 9h ago<span></span> </div>
</div>
<div class="rel">
<a href="http://feedproxy.google.com/~r/HeraldSunNationalNews/~3/N89EJIdwe9E/story-e6frf7l6-1226207160923">Julia Gillard's anti-wrinkle poasdsadasdasdas anti-wrinkle poasdsadasdasdas asdasd asdsadsad anti-wrinkle poasdsadasdasdasasdsd asds...</a>
<div class="rel_source" style="line-height:15px"> Herald Sun | <span class="cat_red">1d 9h ago<span></span> </div>
</div>
<div class="rel">
<a href="http://feedproxy.google.com/~r/HeraldSunNationalNews/~3/N89EJIdwe9E/story-e6frf7l6-1226207160923">Julia Gillard's anti-wrinkle poasdsadasdasdas anti-wrinkle poasdsadasdasdas asdasd asdsadsad anti-wrinkle poasdsadasdasdasasdsd asds...</a>
<div class="rel_source" style="line-height:15px"> Herald Sun | <span class="cat_red">1d 9h ago<span></span> </div>
</div>
</div>
這樣的IM做什麼,我躲在rel_source展現溢出文本(REL)。 我不想要的是隱藏rel_source如果.rel不溢出。 任何解決方案???
http://jsfiddle.net/dGbaD/10/ – user1080711