直接使用css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
div {
width: 0;
height: 0;
border: 20px solid transparent;
border-bottom-color: blue;
}
</style>
<body>
<div></div>
</body>
</html>
效果如下: