我在表格上創建功能區,但面臨一些問題。 我不能在桌子上製作綵帶。一些它看起來很奇怪。使用CSS表格的功能區
.sash {
position: relative;
overflow: hidden;
width: 300px;
}
.sash:after {
content: "Sash";
position: absolute;
width: 90px;
height: 30px;
background: red;
top: 0;
right: 0;
transform: rotate(49deg);
}
<table style="border:1px solid black" class="sash">
<tr>
<td>one line text</td>
<td>two line text</td>
<td>three line text</td>
<td>four line text</td>
<td width="100"></td>
</tr>
<tr>
<td>one line text</td>
<td>two line text</td>
<td>three line text</td>
<td>four line text</td>
<td width="100"></td>
</tr>
</table>
究竟是你想要的視覺效果是什麼? – Serlite
與http://www.cssportal.com/blog/create-corner-ribbon/相同,但使用表格結構。 有沒有其他的方法可以避免像之前那樣的僞類? – Robin