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

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

          Posted on 2007-09-17 14:33 愚人 閱讀(1403) 評論(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相鄰的邊被合并
          主站蜘蛛池模板: 乌拉特后旗| 会同县| 仲巴县| 西充县| 德阳市| 白沙| 确山县| 于都县| 甘泉县| 日土县| 彭阳县| 营山县| 永顺县| 湘阴县| 崇信县| 枣强县| 阿城市| 泗洪县| 祁门县| 普兰店市| 浦东新区| 岳西县| 台东市| 尖扎县| 沅陵县| 土默特右旗| 罗定市| 高邑县| 巴南区| 宜兴市| 汉中市| 蛟河市| 简阳市| 崇明县| 即墨市| 那曲县| 西吉县| 张掖市| 探索| 铜鼓县| 神农架林区|