Table斜线表格
直接上代码:
Html代码:
<table>
<thead>
<tr>
<th colspan="2" class="lineTd">
<span class="leader">市领导</span>
<span class="date">日期</span>
</th>
</tr>
</thead>
</table>
Css代码:
thead{
.lineTd {
width: 33%;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><line x1="0" y1="0" x2="100%" y2="100%" stroke="black" stroke-width="1"/></svg>');
.leader{
float:right;
margin-top:-3%;
}
.date{
float:left;
margin-top:10px
}
}
}
没什么注意的地方,日常记录吧!最后附上效果图: