利用border
边框与边框的交界是个斜线,可以利用他来画三角形
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>三角形</title>
<style>
div{
width: 0px;
height: 0px;
border: 200px solid transparent;
/* border-left-color: greenyellow;
border-right-color: pink; */
border-bottom-color: skyblue;
}
</style>
</head>
<body>
<div></div>
</body>
</html>