<style>
.box1{
/* height: 100px;
width: 100px; */
/* border: 50px solid red; */
width: 0;
border-top: 100px solid red;
border-right: 100px solid pink;
border-bottom: 100px solid greenyellow;
border-left: 100px solid green;
}
.box2{
width: 0;
height: 0;
border: 100px solid transparent;
border-top-color: #000;
margin:10px auto;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
</body>
运行效果