您的位置:首页 > Web前端 > CSS

CSS文字溢出overflow处理

2007-09-17 13:44 507 查看
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<body>

<style tyep="text/css">

div {margin:5px 0;overflow:hidden;width:200px;}

div.a {border:1px solid red; text-overflow:ellipsis;white-space:nowrap;}

div.b {border:1px solid green; text-overflow:ellipsis;-o-text-overflow:ellipsis;white-space:nowrap;}

div.c {border:1px solid blue; text-overflow:ellipsis;-o-text-overflow:ellipsis;}

</style>

<div class="a">

test somthing here.test somthing here.test somthing here.test somthing here.test somthing here.

</div>

<div class="b">

毒其1发缩短发送毒发缩短发撒阿瑟发送发送发缩短发送毒发斯多夫阿瑟毒发撒test111 1111111111111112133435te st1111111111111111112133435 test111111 111 111111 11121 334353 5345345

</div>

<div class="c">

test1111111111111111112133435test1111111111111111112133435test111111111111111111213343535345345 </div>

<div class="c">

test 11111 1111111 1111112133 435te t111 111111 1111111112133435 test1111111111 111111112 13343 53 5345345

</div>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: