CSS 盒子模型 制作倒三角形
下面 hezimx.html
。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>盒模型边框绘制倒三角形</title>
<style type="text/css">
#wrapper {
margin: 50px auto;
width: 300px;
height: 200px;
border: 3px solid red;
}
.tri {
margin: 20px auto;
/*内容宽高均为0*/
width: 0px;
height: 0px;
border: 50px solid orange;
/*下边框设为none*/
border-bottom: none;
/*左右设为透明色*/
border-left-color: transparent;
border-right-color: transparent;
}
</style>
</head>
<body>
<div id="wrapper">
<div class="tri"></div>
</div>
</body>
</html>