用css限制字符串,只能在div中,不能在span中,然后div默认是不平行的
------------------------------------------------------------------------------------
两个div如何平行,只需要使用style 里的float属性
一个 style"float:left" ,另一个style"float:right" 就可以了
<style type="text/css">
.cutLen{
width:280px;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
float: left;
}
</style>
<div class="cutLen">
发生大发撒撒的发生发色发是是飞洒发发生飞洒发安抚撒发生费撒发萨芬萨芬撒发萨芬萨芬撒发生
</div>
<div style="float: right;">
hello world
</div>