我試圖通過使用CSS來創建一個形狀邊界如何製作使用css邊界響應的形狀?
<div class="shape>
</div>
下面是上面的代碼中CSS:
.shape{
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
}
我想作這種形狀響應。可能嗎?感謝提前:)
在寬度和高度上使用%。 – Troyer
將%添加到寬度。 – 2016-12-05 09:40:09
@Troyer 0%的寬度仍然爲0,並且邊框不能位於% – Justinas