乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      css之自動(dòng)換行

       figol 2006-02-25

      大家都知道連續(xù)的英文或數(shù)字能是容器被撐大,不能根據(jù)容器的大小自動(dòng)換行,下面是 CSS如何將他們換行的方法!

      對(duì)于div

      1.(IE瀏覽器)white-space:normal; word-break:break-all;這里前者是遵循標(biāo)準(zhǔn)。

      #wrap{white-space:normal; width:200px; }
      或者
      #wrap{word-break:break-all;width:200px;}
      eg.
      <div id="wrap">ddd1111111111111111111111111111111111</div>
      

      效果:可以實(shí)現(xiàn)換行

      2.(Firefox瀏覽器)white-space:normal; word-break:break-all;overflow:hidden;同樣的FF下也沒(méi)有很好的實(shí)現(xiàn)方法,只能隱藏或者加滾動(dòng)條,當(dāng)然不加滾動(dòng)條效果更好!

      #wrap{white-space:normal; width:200px; overflow:auto;}
      或者
      #wrap{word-break:break-all;width:200px; overflow:auto; }
      eg.
      <div id="wrap">ddd1111111111111111111111111111111111111111</div>
      
      效果:容器正常,內(nèi)容隱藏

      對(duì)于table

      1. (IE瀏覽器)使用樣式;
      eg.

      <style>
      .tb{}
      </style>
      <table class="tbl" width="80">
      <tr>
      <td>abcdefghigklmnopqrstuvwxyz 1234567890
      </td>
      </tr>
      </table>
      

      效果:可以換行

      2.(IE瀏覽器)使用樣式與nowrap
      eg.

      <style>
      .tb {}
      </style>
      <table class="tb" width="80">
      <tr>
      <td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890
      </td>
      </tr>
      </table>
      

      效果:可以換行

      3. (IE瀏覽器)在使用百分比固定td大小情況下使用樣式與nowrap

      <style>
      .tb{}
      </style>
      <table class="tb" width=80>
      <tr>
      <td width=25% nowrap>abcdefghigklmnopqrstuvwxyz 1234567890
      </td>
      <td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890
      </td>
      </tr>
      </table>
      

      效果:兩個(gè)td均正常換行

      3.(Firefox瀏覽器)在使用百分比固定td大小情況下使用樣式與nowrap,并且使用div
      eg.

      <style>
      .tb {}
      .td {overflow:hidden;}
      </style>
      <table class=tb width=80>
      <tr>
      <td width=25% class=td nowrap>
      <div>abcdefghigklmnopqrstuvwxyz 1234567890</div>
      </td>
      <td class=td nowrap>
      <div>abcdefghigklmnopqrstuvwxyz 1234567890</div>
      </td>
      </tr>
      </table>
      

      這里單元格寬度一定要用百分比定義

      效果:正常顯示,但不能換行(注:在FF下還沒(méi)有能使容器內(nèi)容換行的好方法,只能用overflow將多出的內(nèi)容隱藏,以免影響整體效果)

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多