表格居中
<style>
table {
margin-left:auto;
margin-right:auto;
}
</style>
表格宽度
width="80%"
自定义表格
<style>
.pxy .sgrna-details-table {
border: 0px;
}
/*这里处理的是每行第一个td的格式*/
.pxy .sgrna-details-table tbody td:first-child {
text-align: center;
color: DarkSlateGray;
font-size: 120%;
}
.pxy .sgrna-details-table td {
text-align: left;
}
</style>
由于我引用的css文件中有对table定义的,所以需要在本页面中写style,引用时div和table的class都要写,缺一不可。
<div class="pxy sgrna-details-table">
<table class="pxy sgrna-details-table">
</table>
</div>