用css3寫出的倒三角形

<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312" />
<title>無標題文檔</title>
<style>
.triangle-left {
width:0;
height:0;
border-right:20px solid yellow;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
}html

.triangle-up {
width:0;
height:0;
border-bottom:20px solid yellow;
border-left:20px solid transparent;
border-right:20px solid transparent;
}
.triangle-right {
width:0;
height:0;
border-left:20px solid yellow;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
}
.triangle-down {
width:0;
height:0;
border-top:20px solid yellow;
border-left:20px solid transparent;
border-right:20px solid transparent;
}
</style>
</head>post

<body>
<div class="triangle-left"></div>
<div class="triangle-up"></div>
<div class="triangle-right"></div>
<div class="triangle-down"></div>
</body>
</html>spa

 

轉載自:https://www.cnblogs.com/ll-taj/p/5222412.htmlhtm

相關文章
相關標籤/搜索