当输入的文字过多的时候会出现这样的情况:
超出了了元素边界,代码是这样的:
<view class="desc_content" catchtap="goEditSnippet" data-index="{{index}}" hover-class="navigator-hover">{{item.desc||'点击输入文字'}}</view>
解决办法:修改view的样式:
.desc_content{
color:#999;
height:60px;
width:95%;
line-height:60px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
兼容IE/Firefox/Chrome
在该div或者快元素里添加css样式:
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
然后就好了请看