css有哪些常用表格属性
展开全部
CSS 字体属性(Font)
属性 描述 CSS
font 在一个声明中设置所有字体属性。 1
font-family 规定文本的字体系列。 1
font-size 规定文本的字体尺寸。 1
font-size-adjust 为元素规定 aspect 值。 2
font-stretch 收缩或拉伸当前的字体系列。 2
font-style 规定文本的字体样式。 1
font-variant 规定是否以小型大写字母的字体显示文本。 1
font-weight 规定字体的粗细。 1
如何用CSS制作表格效果的样式
xhtml如下:
Widgets America (source by item)
-
- 8476292163
- Cheese Widget
- Green
- Yes
- $3.14
CSS如下:
/* Widgets America (by item)
------------------------------------*/
div#byitem ul.vert {
list-style-type: none;
padding: 0;
margin: 0;
width: 540px;
}
div#byitem ul.vert li {
padding: 4px 0;
margin: 0;
height: 14px; /* space out your rows */
}
div#byitem ul.vert li.odd {
background-color: #eee;
}
div#byitem ul.horz {
clear: left;
list-style-type: none;
padding: 0;
margin: 0;
}
div#byitem ul.horz li {
float: left;
width: 80px;
padding: 0 20px 0 0;
margin: 0;
}
div#byitem ul.horz li.name { /* size your columns individually at the expense of ?
slightly bloated markup (labelling each appropriate
with this class) */
width: 130px;
}
div#byitem ul.horz li.price {
text-align: right;
padding-right: 0;
}Css定义不同表格样式
.td{
line-height: 10px;/**数字调整行距**/
}
然后在要用到的表格加上class="td"