原生表格table

1).table{
width: 100%;//让表格里面的内容充满整个区域
border-collapse:collapse; 去掉html表格之table间的空隙
}

2)表格里面的内容居中
.mytable td{
text-align: center;
}

3)HTML中怎么去掉table中th的默认粗体
可以在<th>标签中设置style="font-weight:300; font-size:12px;",也可以在<style></style>
中设置:即
<style type="text/css">
table tr th{
font-weight:300px;
font-size:12px
}

4)CSS中给表格的第一列以及最后一列设置不同的样式
https://blog.csdn.net/Nalaluky/article/details/80012922

table tr td:last-child{
样式代码....
}

除了第一列元素外
.mytable tr td:not(:first-child){
border-bottom:1px dashed #ccc;
}

border-radius: 4px;
box-shadow: 0px 0px 16px 0px rgba(0,0,0,0.14);

猜你喜欢

转载自www.cnblogs.com/IwishIcould/p/11853793.html