首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

设立表格样式-细线边框

2012-12-22 
设置表格样式-细线边框style typetext/css.tab1{background:red}.tab1 td{background:#fff}/style

设置表格样式-细线边框
<style type="text/css">
    .tab1{background:red;}
    .tab1 td{background:#fff;}
</style>

定义上面的样式,然后在页面中的表格应用此样式会得到细线的边框表格,如红色字体部分:
<TABLE cellSpacing="1" cellPadding="0" width="100%" border="0" class="tab1" >

<style type="text/css">
   table { background-color:#cccccc; }
   tr { background-color:#ffff7f; }
   td { height:24px; padding:2px; }
</style>

热点排行