代码:
.box {
width: 50px;
height: 50px;
background-color: purple;
border-top: 50px solid blue;
border-left: 50px solid pink;
border-right: 50px solid orange;
border-bottom: 50px solid red;
}
<body>
<div class="box">
</div>
</body>
效果图
代码
.box {
width: 0;
height: 0;
border-width: 50px;
border-style: solid;
border-color: orange blue pink red;
}
<body>
<div class="box">
</div>
</body>
效果图