使用CSS设置表格
来源:百度文库 编辑:神马文学网 时间:2024/06/03 08:53:12
效果图:
HTML代码:
CSS代码:
/**//*2008.09.28*/
Table.tableList{}{
border-top:1px solid #000000;
border-bottom:1px solid #000000;
border-left:0px solid #000000;
border-left:0px solid #000000;
}
Table.tableList caption{}{
font-size:16px;
font-weight:bold;
}
Table.tableList thead{}{
height:31px;
background:#ffffff url(../img/th_flower_bg.gif) repeat-x left center:
border-top:1px solid #e0dace;
border-bottom:1px solid #e0dace;
}
Table.tableList tbody{}{
height:25px;
}
Table.tableList th{}{
border-bottom:1px solid #e0dace;
text-align:center;
}
Table.tableList tr.odd{}{
background-color:#faf4e8;
}
Table.tableList td{}{
border-bottom:1px solid #e0dace;
padding-left:4px;
padding-right:4px;
padding-top:4px;
padding-bottom:1px;
text-align:left;
}
所有代码下载:
http://www.blogjava.net/Files/sitinspring/CssTable20080928145513.rar
New Document
回复 更多评论 New Document
HTML代码:
三代 | 汉朝 | 晋朝 | 唐朝 | 宋朝 | 明朝 |
---|---|---|---|---|---|
孔子 | 董仲舒 | 阮籍 | 李白 | 苏轼 | 王阳明 |
孟子 | 东方朔 | 嵇康 | 杜甫 | 辛弃疾 | 唐寅 |
老子 | 扬雄 | 陶渊明 | 李商隐 | 陆游 | 徐渭 |
庄子 | 左思 | 王羲之 | 李贺 | 范仲淹 | 杨慎 |
荀子 | 司马迁 | 庾信 | 王维 | 欧阳修 | 吕坤 |
韩非子 | 班固 | 鲍照 | 白居易 | 苏洵 | 宋濂 |
CSS代码:
/**//*2008.09.28*/
Table.tableList{}{
border-top:1px solid #000000;
border-bottom:1px solid #000000;
border-left:0px solid #000000;
border-left:0px solid #000000;
}
Table.tableList caption{}{
font-size:16px;
font-weight:bold;
}
Table.tableList thead{}{
height:31px;
background:#ffffff url(../img/th_flower_bg.gif) repeat-x left center:
border-top:1px solid #e0dace;
border-bottom:1px solid #e0dace;
}
Table.tableList tbody{}{
height:25px;
}
Table.tableList th{}{
border-bottom:1px solid #e0dace;
text-align:center;
}
Table.tableList tr.odd{}{
background-color:#faf4e8;
}
Table.tableList td{}{
border-bottom:1px solid #e0dace;
padding-left:4px;
padding-right:4px;
padding-top:4px;
padding-bottom:1px;
text-align:left;
}
所有代码下载:
http://www.blogjava.net/Files/sitinspring/CssTable20080928145513.rar
posted on 2008-09-28 15:04 sitinspring 阅读(176) 评论(3) 编辑 收藏 所属分类: HTML,CSS&JS
评论
# re: 使用CSS设置表格 2008-09-28 18:57 日月雨林@gmail.com
不错不错!! 回复 更多评论
# re: 使用CSS设置表格 2008-09-29 05:27 sclsch
你好,我按照你的做了,代码如下: table 的css就是不起作用,你看看是哪里有问题
三代 | 汉朝 | 晋朝 | 唐朝 | 宋朝 | 明朝 |
---|---|---|---|---|---|
孔子 | 董仲舒 | 阮籍 | 李白 | 苏轼 | 王阳明 |
孟子 | 东方朔 | 嵇康 | 杜甫 | 辛弃疾 | 唐寅 |
老子 | 扬雄 | 陶渊明 | 李商隐 | 陆游 | 徐渭 |
庄子 | 左思 | 王羲之 | 李贺 | 范仲淹 | 杨慎 |
荀子 | 司马迁 | 庾信 | 王维 | 欧阳修 | 吕坤 |
韩非子 | 班固 | 鲍照 | 白居易 | 苏洵 | 宋濂 |
回复 更多评论
# re: 使用CSS设置表格 2008-09-29 09:55 sitinspring
你多加了大括号,下面代码可以参考。
三代 | 汉朝 | 晋朝 | 唐朝 | 宋朝 | 明朝 |
---|---|---|---|---|---|
孔子 | 董仲舒 | 阮籍 | 李白 | 苏轼 | 王阳明 |
孟子 | 东方朔 | 嵇康 | 杜甫 | 辛弃疾 | 唐寅 |
老子 | 扬雄 | 陶渊明 | 李商隐 | 陆游 | 徐渭 |
庄子 | 左思 | 王羲之 | 李贺 | 范仲淹 | 杨慎 |
荀子 | 司马迁 | 庾信 | 王维 | 欧阳修 | 吕坤 |
韩非子 | 班固 | 鲍照 | 白居易 | 苏洵 | 宋濂 |