div+css截取字符串在规定长度,超出部分用。。。代替
<!--
表现层的问题需要表现层解决,不在服务器端提交处理,相比截取字符段的c#处理代码,用css处理轻松很多-->
<html>
<head>
<styletype="text/css">
div{
width:260px;
word-break:keep-all;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
div2{
border:0pxsolidred;width:45px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
</style>
</head>
<body>
<div>轻轻松松制作div+css截取字符段在规定长度,超出部分用。。。代替!</div>
</body>
</html>
相关推荐
qiupu 2020-11-04
多读书读好书 2020-11-03
RedCode 2020-10-28
jiedinghui 2020-10-25
Ladyseven 2020-10-22
hellowzm 2020-10-12
zuncle 2020-09-28
Ladyseven 2020-09-11
jiedinghui 2020-09-07
xiaohuli 2020-09-02
葉無聞 2020-09-01
impress 2020-08-26
ThikHome 2020-08-24
nicepainkiller 2020-08-20
hellowzm 2020-08-18