上三角
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 50px solid red;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
//
下三角
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 50px solid red;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
左侧三角
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-bottom: 50px solid transparent;
border-top: 50px solid red;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
左三角
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-right: 50px solid red;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>