用css画三角形技巧
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
div{
width: 0px;
height: 0px;
border-top:25px solid red;
/* border-right:25px solid yellow;
border-left:25px solid green;
border-bottom:25px solid blue; */
border-right:25px solid transparent;
border-left:25px solid transparent;
border-bottom:25px solid transparent;
}
</style>
<body>
<div></div>
</body>
</html>
就是任意改变这四个值调试三角型形状 可以使用f12 调试玩一玩