My CSS:
#content_right_head span
{
display:inline-block;
width:180px;
overflow:hidden !important;
}
现在显示content content个
但我想表现得像
我需要在内容后面显示点.内容动态地来自数据库.
My CSS:
#content_right_head span
{
display:inline-block;
width:180px;
overflow:hidden !important;
}
现在显示content content个
但我想表现得像
我需要在内容后面显示点.内容动态地来自数据库.
为此,您可以使用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>