<div style=" border: solid; margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-bottom: 5px; border-width: 0px 1px; border-color: #99cccc #006699; font-size: 12px; line-height: 150%; padding-right: 5px; padding-left: 5px; color: #333333">sdfsdf</div>
用样式表最方便,代码简洁,可以统一整个网站的风格。.td2 { border: solid; margin-top: 2px; margin-right: 2px; margin-bottom: 2px; margin-left: 2px; padding-top: 5px; padding-bottom: 5px; border-width: 0px 1px; border-color: #99cccc #006699; font-size: 12px; line-height: 150%; padding-right: 5px; padding-left: 5px; color: #333333}
这里定义了表格的两个竖边的宽度和颜色,在页面里只是简单的写上<td class=td2>,多简单!:)
水平线不需要用CSS ,直接在代码中加入颜色的十六进制就可以了。
如:<hr color=#abcdef size="1">
表格,图片,hr,还是要放到<div>中的
我一般这样写:
<div style="position:absolute; left:10px; top:10px;
border-left:1px solid black;
background:none;
font-size:0px"></div> (竖线)
如果会使用滤镜和js的话,可以做成很炫的效果
1<div style="width:1000;height:1;;border-top:1px dotted #000000"></div>2<s style="width:1000;height:1;border-top:1px dotted #000000"></s>3<b style="width:1000;height:1;border-top:1px dotted #000000"></b>4<input style="width:1000;height:1;border-top:1px dotted #000000">5<a style="width:1000;height:1;;border-top:1px dotted #000000"></a>6<center style="width:1000;height:1;;border-top:1px dotted #000000"></center>7<iframe style="width:1000;height:1;;border-top:1px dotted #000000;" frameborder=no></iframe>8<img style="width:1000;height:1;;border-top:1px dotted #000000"></img>9<hr size="1" noshade style="height:100;width:1;border:1px dotted #000000;zoom:2">线条长度=zoom*height10<hr size="1" noshade style="border:1px dotted #000000">部分不能显示请装IE5.5+