CSS3 text-overflow
本例演示当光标浮动到元素上时如何显示全部文本
<!DOCTYPE html>
<html>
<head>
<style>
div.test
{
white-space:nowrap;
width:12em;
overflow:hidden;
border:1px solid #000000;
}
div.test:hover
{
text-overflow:inherit;
overflow:visible;
}
</style>
</head>
<body>
<p>如果您把光标移动到下面两个 div 上,就能够看到全部文本。</p>
<p>这个 div 使用 "text-overflow:ellipsis" :</p>
<div class="test" style="text-overflow:ellipsis;">This is some long text that will not fit in the box</div>
<p>这个 div 使用 "text-overflow:clip":</p>
<div class="test" style="text-overflow:clip;">This is some long text that will not fit in the box</div>
</body>
</html> 相关推荐
zhanghao 2020-06-16
bertzhang 2019-12-25
RexLeee 2019-12-23
AlisaClass 2015-12-29
zhanghao 2018-01-05
沉着前进 2018-01-05
huakaiwuxing 2015-12-29
AlisaClass 2015-05-27
sdbxpjzq 2014-01-15
xvzhengyang 2013-08-15
walliam 2013-07-24
gigipop 2013-05-06
impress 2013-04-09
impress 2012-11-29
teresalxm 2012-11-18
pworld 2012-09-26
新海说 2014-05-19