`

div+css截取字符串在规定长度,超出部分用。。。代替

阅读更多
<!--
表现层的问题需要表现层解决,不在服务器端提交处理,相比截取字符段的c#处理代码,用css处理轻松很多-->
<html>
<head>
<style type="text/css">
div{
width:260px;
word-break:keep-all;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

div2{
border:0px solid red;width:45px; white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
</style>
</head>

<body>
<div> 轻轻松松制作div+css截取字符段在规定长度,超出部分用。。。代替!</div>
</body>
</html>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics