一、这是要实现的效果图
二、思考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>CSS三角</title>
<style>
.box1{
width: 0;
height: 0;
border-top: 50px solid pink;
border-right:50px solid blue ;
border-bottom: 50px solid skyblue;
border-left: 50px solid antiquewhite;
}
.box2{
width: 0;
height: 0;
line-height: 0;/*为了照顾低版本浏览器写的*/
font-size: 0;/*为了照顾低版本浏览器写的*/