css:
.text {
/*固定宽度*/
width: 100rpx;
/*超出部分隐藏*/
overflow:hidden;
/*不换行*/
white-space:nowrap;
/*添加...*/
text-overflow:ellipsis;
}
wxml:
<view class=text" >字数过长字数过长字数过长字数过长字数过长字数过长字数过长字数过长字数过长</view>
css:
.text {
/*固定宽度*/
width: 100rpx;
/*超出部分隐藏*/
overflow:hidden;
/*不换行*/
white-space:nowrap;
/*添加...*/
text-overflow:ellipsis;
}
wxml:
<view class=text" >字数过长字数过长字数过长字数过长字数过长字数过长字数过长字数过长字数过长</view>