posts - 17, comments - 4, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          制作1px表格邊框的十種方法

          Posted on 2007-09-17 14:33 愚人 閱讀(1397) 評論(0)  編輯  收藏 所屬分類: Xhtml/css
          方法一:
          使用1*1的圖片,來填充單元格背景,并設置單元格的寬度,高度為1px
          第二種:
          <html>
          <body>
          <table width="200" height="100" border="1" bordercolor="red" cellspacing="0">
          <tr>
          <td></td><!--單元格中不要插入任何東東-->
          </tr>
          </table>
          </body>
          </html>
          第三種:利用二級表格
          <table width="200" height="100" border="0" bgcolor="red" cellspacing="0" cellpadding="0">
          <tr>
          <td align="center" valign="middle">
          <table width="198" height="98" bgcolor="white" border="0">
          <tr>
          <td>www.blueidea.com</td>
          </tr>
          </table>
          </td>
          </tr>
          </table>
          第四種:利用單元格背景填充
          <table width="200" height="100" border="0" cellspacing="0" cellpadding="0">
          <tr>
          <td colspan="3" height="1" bgcolor="red"></td>
          </tr>
          <tr>
          <td width="1" bgcolor="green"></td><td width="198" height="98">www.blueidea.com</td><td width="1" bgcolor="blue"></td>
          </tr>
          <tr>
          <td colspan="3" height="1" bgcolor="orchid"></td>
          </tr>
          </table>
          第五種:利用亮邊框和暗邊框
          <table width="200" height="100" border="1" bordercolorlight="red" bordercolordark="white"
          cellpadding="0" cellspacing="0">
          <tr>
          <td>www.blueidea.com</td><td>www.blueidea.com</td>
          </tr>
          </table>
          第六種:利用單元格的間距
          <table width="200" height="100" border="0" bgcolor="red"
          cellpadding="0" cellspacing="1">
          <tr>
          <td bgcolor="white">www.blueidea.com</td><td  bgcolor="white">www.blueidea.com</td>
          </tr>
          </table>
          第七種:利用collapse
          <table width="200" height="100" border="1" bordercolor="blue" cellspacing="0" style="border-collapse:collapse">
          <tr>
          <td>www.blueidea.com</td><td>www.blueidea.com</td>
          </tr>
          </table>
          第八種:利用border
          <table width="200" height="100" border="0" style="border:1px red solid">
          <tr>
          <td>www.blueidea.com</td><td>www.blueidea.com</td>
          </tr>
          </table>

          style="border-collapse:collapse" 這句什么意思?
          collapse相鄰的邊被合并
          主站蜘蛛池模板: 湖南省| 湾仔区| 略阳县| 西林县| 丰城市| 湖北省| 绥德县| 海门市| 瓦房店市| 塘沽区| 太仓市| 衡水市| 普定县| 丹巴县| 东乡县| 贵德县| 汉源县| 塔河县| 峨眉山市| 余干县| 白水县| 牡丹江市| 兴业县| 白沙| 东阿县| 德保县| 峨山| 沧州市| 砀山县| 胶州市| 南岸区| 雷波县| 乐都县| 吴江市| 泌阳县| 蚌埠市| 东山县| 余干县| 任丘市| 西充县| 双鸭山市|