posts - 82, comments - 269, trackbacks - 0, articles - 1
            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
          FROM:http://blog.doyoe.com/article.asp?id=160

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml">
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
          <meta http-equiv="Content-Language" content="gb2312" />
          <title>test</title>
          <meta name="Author" content="Doyoe(飄零霧雨), edzmaster@gmail.com" />
          <style type="text/css">
          table {width:500px;table-layout:fixed;}
          .col1 {width:100px;}
          .col2 {width:200px;}
          .col3 {width:200px;}
          th strong {display:block;width:100%;}
          tr strong,tr td {white-space:nowrap;overflow:hidden;}
          </style>
          </head>
          <body>
          <table border="1" cellspacing="0" summary="測(cè)試">
          <thead>
           <tr>
            <th class="col1"><strong>產(chǎn)品名稱(chēng)</strong></th>
            <th class="col2"><strong>產(chǎn)品介紹</strong></th>
            <th class="col3"><strong>產(chǎn)品備注</strong></th>
           </tr>
          </thead>
          <tbody>
           <tr>
            <td>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</td>
            <td>優(yōu)雅Q400N,2007年7月上市,采用Intel Core2 Duo(Merom) T5450(1.66G)處理器</td>
            <td>迅馳4平臺(tái),突出的性?xún)r(jià)比,漂亮的外觀</td>
           </tr>
          </tbody>
          </table>
          </body>
          </html>

          評(píng)論

          # re: 表格固定寬度的demo-不換行,自動(dòng)的隱藏多余的內(nèi)容。  回復(fù)  更多評(píng)論   

          2008-03-21 13:54 by yes ppg
          主要是
          td {white-space:nowrap;overflow:hidden;}
          這段CSS的作用吧

          # re: 表格固定寬度的demo-不換行,自動(dòng)的隱藏多余的內(nèi)容。  回復(fù)  更多評(píng)論   

          2010-12-27 17:53 by cluo
          關(guān)鍵代碼:table {width:500px;table-layout:fixed;}
          tr td {white-space:nowrap;overflow:hidden;}

          # re: 表格固定寬度的demo-不換行,自動(dòng)的隱藏多余的內(nèi)容。  回復(fù)  更多評(píng)論   

          2014-11-10 10:47 by 是短發(fā)
          阿薩德飛規(guī)劃局合格

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 舟曲县| 格尔木市| 启东市| 巫山县| 四子王旗| 巴南区| 锡林郭勒盟| 宁阳县| 中山市| 新建县| 淮南市| 军事| 阿勒泰市| 凤山市| 田林县| 侯马市| 高尔夫| 绥阳县| 安吉县| 琼结县| 集安市| 雅安市| 怀宁县| 凤庆县| 康平县| 东山县| 墨脱县| 赞皇县| 浙江省| 夏津县| 津市市| 深圳市| 龙州县| 安龙县| 文山县| 河源市| 石首市| 嵊泗县| 土默特右旗| 珲春市| 岢岚县|