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

table -css

2012-11-07 
table --csstable cellspacing1/table边框线默认是2#content table{width:80%background:#ccc---

table --css

<table cellspacing="1"></table>  边框线默认是2#content table{  width:80%;  background:#ccc;---灰色的背景 ,因为只有边框没有被覆盖颜色,所以这里的ccc就是背景的颜色了}/*如果不在table 中写 cellspacing,那么可以这样#content table{  width:80%;  background:#ccc;  border-collapse:collapse; ---去掉边框}#content th ,#content td{  height:25px;  line-height:25px;  text-align:center;  border:1px solid #ccc; ----然后给th,td加一根线}*//*#content tr:hover{  background:#cc0;  -----注意:这是没用的,因为会被th,td重写,所以效果是没有的}*/#content th ,#content td{  height:25px;  line-height:25px;  text-align:center;}#content th{  background:#eee;  ---淡灰色的th}/*#content td{  backgground:#fff;  ---白色的td}因为我们要使得td的那一行变颜色,所以按下面这么做*/#content tr{ background:#fff;}#content tr:hover{  background:#cc0;}

热点排行