html代码做一些特殊表格
我们一般制作帖子的表格边框,基本上大同小异.现在教大家用代码制作别具一格的表格边框.在这里所有的效果我只用套材来举例.边框里可以放图片和文字,也可以换成颜色和文字.图片和颜色大家可以根据需要自己更换.只要发挥想象力,相信大家都能制作出更漂亮的表格边框.
语法简单介绍:
BORDER-RIGHT: #9b0000 6px ridge; 右边框颜色 宽度 样式 BORDER-TOP: #9b0000 6px ridge; 上边框颜色 宽度 样式 BORDER-LEFT: #9b0000 6px ridge; 左边框颜色 宽度 样式 BORDER-BOTTOM: #9b0000 6px ridge; 下边框颜色 宽度 样式 ; 外边框定位(相对定位) ; 内部小表格的定位(绝对定位) LEFT: 0px; 离左边的距离 TOP: 0px; 离顶部的距离 RIGHT: 0px; 离右边的距离 BOTTOMM: 0px; 离下边的距离 HEIGHT: 512px 表格高度 WIDTH: 512px; 表格宽度 表格边框的样式还有以下几种(换不同的值就会有不同的边框样式):
none | dotted | dashed | solid | double | groove | ridge | inset | outset
注意点:
如果不是宽屏外边框必须赋于相对定位.内部表格必须绝对定位. 上,下,左,右边框如果有不需要显示的,将该边的宽度值 设为0即可. 主要图片以背景的方式加入即放在<*table>里更好一些.
效果一:
代码如下
<TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 512px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 512px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perrobgtile_rYxIjcec9IlL.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; LEFT: 0px; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; WIDTH: 120px; BOTTOM: 0px; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-TOP: #9b0000 6px ridge; LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
效果二:
代码如下:
<TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 512px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 512px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perrobgtile_rYxIjcec9IlL.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; LEFT: 0px; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_44IdYKd0vnjs.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 7px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 7px; HEIGHT: 100px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic_wTV3QltYXTLH.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE style="LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_44IdYKd0vnjs.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; RIGHT: 7px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 7px; HEIGHT: 100px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic_wTV3QltYXTLH.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; WIDTH: 120px; BOTTOM: 0px; ; HEIGHT: 120px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_44IdYKd0vnjs.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 7px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BOTTOM: 7px; BORDER-BOTTOM: #9b0000 6px ridge; ; HEIGHT: 100px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic_wTV3QltYXTLH.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE style="BORDER-TOP: #9b0000 6px ridge; LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; ; HEIGHT: 120px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_44IdYKd0vnjs.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; RIGHT: 7px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BOTTOM: 7px; BORDER-BOTTOM: #9b0000 6px ridge; ; HEIGHT: 100px" background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic_wTV3QltYXTLH.jpg cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
效果三:
代码如下:
<TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 512px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 512px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perrobgtile_rYxIjcec9IlL.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; LEFT: 0px; WIDTH: 120px; ; TOP: 0px; HEIGHT: 380px" cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg></TD></TR></TBODY></TABLE><TABLE style="LEFT: 120px; WIDTH: 380px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 0px ridge; BORDER-TOP: #9b0000 0px ridge; LEFT: 120px; BORDER-LEFT: #9b0000 0px ridge; WIDTH: 262px; BORDER-BOTTOM: #9b0000 0px ridge; ; TOP: 120px; HEIGHT: 262px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/646808-Springtime_Sch71VLQfYe6.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; WIDTH: 380px; BOTTOM: 0px; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg></TD></TR></TBODY></TABLE><TABLE style="LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; ; HEIGHT: 380px" cellSpacing=0 cellPadding=0 border=0><TBODY><TR><TD background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perropic1_LrdOq57IrprQ.jpg></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
效果四:
代码如下:
<TABLE style="BORDER-RIGHT: #9b0000 0px ridge; BORDER-TOP: #9b0000 0px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 0px ridge; WIDTH: 500px; BORDER-BOTTOM: #9b0000 0px ridge; ; TOP: 0px; HEIGHT: 500px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perrobgtile_rYxIjcec9IlL.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/bouquetbgtile_II1Izkbri0CD.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/bouquetbgtile_II1Izkbri0CD.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 114px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 272px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 114px; HEIGHT: 272px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/bouquetbgtile_II1Izkbri0CD.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; BORDER-BOTTOM: #9b0000 6px ridge; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/bouquetbgtile_II1Izkbri0CD.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; BORDER-BOTTOM: #9b0000 6px ridge; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/bouquetbgtile_II1Izkbri0CD.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
效果五:
写字
内容
代码如下:
<TABLE style="BORDER-RIGHT: #9b0000 0px ridge; BORDER-TOP: #9b0000 0px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 0px ridge; WIDTH: 500px; BORDER-BOTTOM: #9b0000 0px ridge; ; TOP: 0px; HEIGHT: 500px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/perrobgtile_rYxIjcec9IlL.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_Vb2kaQvzUpjv.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 4px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 4px; HEIGHT: 100px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/646808-Springtime1_q3af2LrCJyr0.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 0px; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_Vb2kaQvzUpjv.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; RIGHT: 4px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 4px; HEIGHT: 100px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/646808-Springtime1_q3af2LrCJyr0.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 114px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 272px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 114px; HEIGHT: 272px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/646808-Springtime_Sch71VLQfYe6.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 0px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; BORDER-BOTTOM: #9b0000 6px ridge; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_Vb2kaQvzUpjv.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 4px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 4px; HEIGHT: 100px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/646808-Springtime1_q3af2LrCJyr0.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 380px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 120px; BOTTOM: 0px; BORDER-BOTTOM: #9b0000 6px ridge; ; HEIGHT: 120px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/20041230144924904_Vb2kaQvzUpjv.jpg border=0><TBODY><TR><TD><TABLE style="BORDER-RIGHT: #9b0000 6px ridge; BORDER-TOP: #9b0000 6px ridge; LEFT: 4px; BORDER-LEFT: #9b0000 6px ridge; WIDTH: 100px; BORDER-BOTTOM: #9b0000 6px ridge; ; TOP: 4px; HEIGHT: 100px" cellSpacing=0 cellPadding=0 background=http://txws.qq.topzj.com/attachments/m27//29/94/29949/forumid_23597/646808-Springtime1_q3af2LrCJyr0.jpg border=0><TBODY><TR><TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
评论