(css)span内容过长省略加提示
【代码】(css)span内容过长省略加提示。
·
(css)span内容过长省略加提示
<span class="right" title="123">123</span> //添加title
<span class="right" :title="item.value">{{ item.value }}</span> //添加:title
.right {
width: 78%;
margin-bottom: 15px;
margin-left: 20px;
overflow: hidden; //溢出内容隐藏
white-space: nowrap; //强制文本在一行显示,不能换行
text-overflow: ellipsis; //当对象内文本溢出时显示省略标志
}
解决参考:https://blog.csdn.net/wulikunbing/article/details/128201927
更多推荐
已为社区贡献12条内容
所有评论(0)