My CSS:
#content_right_head span
{
display:inline-block;
width:180px;
overflow:hidden !important;
}
现在正在显示内容内容
但我想表现得像内容内容...
我需要在内容后显示点。内容动态地来自数据库。
为此,您可以使用text-overflow: ellipsis;
财产。像这样写
span {
display: inline-block;
width: 180px;
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis;
}
<span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book</span>
JSFiddle
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)