首頁  >  文章  >  web前端  >  css文本自动换行_html/css_WEB-ITnose

css文本自动换行_html/css_WEB-ITnose

WBOY
WBOY原創
2016-06-24 11:52:16786瀏覽

<html><head><style>article{   width:600px;   height:200px;   display:-moz-box;   display:-webkit-box;   display:box;}.sectionOne{   background:orange;   -moz-box-flex:3;   -webkit-box-flex:3;   box-flex:3;}.sectionTwo{   background:purple;   -moz-box-flex:2;   -webkit-box-flex:2;   box-flex:2;}.sectionThree{   -moz-box-flex:1;   -webkit-box-flex:1;   box-flex:1;   background:green;}</style></head><article>   <section class="sectionOne">010000000000000000000001111111111111111</section>   <section class="sectionTwo">02</section>   <section class="sectionThree">03</section></article><html>


sectionOne里面的文字怎样自动换行?word-break: break-all;和word-wrap: break-word;都不起作用


回复讨论(解决方案)

定义宽度
.sectionOne{
   background:orange;
   -moz-box-flex:3;
   -webkit-box-flex:3;
   box-flex:3;
  width:80px;
 word-break:break-all;
}

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn