赞
踩
table, th, td
{
border: 1px solid black;
}
table
{
width:100%;
}
th
{
height:50px;
}
td
{
text-align:right;
}
如果在表的内容中控制空格之间的边框,应使用td和th元素的填充属性:
td
{
padding:15px;
}
下面的例子指定边框的颜色,和th元素的文本和背景颜色:
实例
table, td, th
{
border:1px solid green;
}
th
{
background-color:green;
color:white;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。