首页 热点资讯 义务教育 高等教育 出国留学 考研考公

Css定义不同表格样式

发布网友 发布时间:2022-04-22 22:36

我来回答

4个回答

热心网友 时间:2022-05-13 16:19

以下是定义行高代码,数字越大,行与行之间距离越大
.td{
line-height: 12px;
}
或者用百分比也行
.td{
line-height: 150%;
}
调用时先在<head></head>之间放入
<link href="css.css" rel="stylesheet" type="text/css" />
注意href="css.css"是路径自己定义
调用时用class="td"就行了
例:
<table width="50" >
<tr>
<td class="td">121312313131</td>
</tr>
</table>

热心网友 时间:2022-05-13 17:37

line-height设置字体行高,也是行内文字垂直居中常用到的方法
.XXXX{
line-height:0.8em; /**0.8倍默认字体高度**/
}
代码调用为class="XXXX"

热心网友 时间:2022-05-13 19:11

定义样式:
#td{height:20px;line-height:20px}字体居中显示.

调用样式:
<table><tr><td id="td">内容</td></tr></table>.

热心网友 时间:2022-05-13 21:03

.td{
line-height: 10px;/**数字调整行距**/
}

然后在要用到的表格加上class="td"

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com