CSS设置当宽度不够时自动换行
如图:
1、自动换行
// html <div>111111111111111111111111</div> // css widht:100%; height:100%; word-wrap: break-word
2、限制宽高度
// html <div>11111111111111111111111111</div> //css widht:100px; height:100px; overflow:hidden // 如果想让元素可以滚动,设置为auto即可
(注意:如果div放在li中还需要加上display:inline-block属性)