文章中表格的列宽控制

插入的表格列宽如果出现无法控制的情况,想自定义宽度,可以把如下代码直接粘贴到文章页面,对应样式中的宽度根据自己的情况修改就可以了。

笔者亲测有效

1
2
3
4
5
6
7
8
9
10
11
12
<style>
table th:nth-of-type(1){
width: 10%; //第一列宽度
}
table th:nth-of-type(2){
width: 20% //第二列宽度
;
}
table th:nth-of-type(3){
width: 70%; //第三列宽度
}
</style>