<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>三角形</title>
<style>
body {
background-color: #999;
}
.box {
width: 0;
height: 0;
border: 100px solid transparent;;
/* border-left: 100px solid transparent;
border-right: 100px solid transparent;
border-top: 100px solid transparent;
border-bottom: 100px solid #fff; */
/* border-bottom: 100px solid red; */
border-bottom-color: red;
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>
CSS-用边框做出三角形案例
最新推荐文章于 2024-08-16 20:24:29 发布