CSS 实现五边形
五边形效果如下图:
代码如下
<!DOCTYPE html>
<html>
<head>
<style>
.div-p {
width: 300px;
height: 300px;
background: silver;
}
.cus{
width: 0;
height: 0;
border: 30px solid #db2d04;
border-bottom: 10px solid #db2d04 !important;
// border-bottom-color: red;
position: relative;
top: 100px;
}
.cus:after {
content: '';
width: 0;
height: 0;
border-top: 10px solid #db2d04 !important;
border: 30px solid transparent;
// border-bottom-color: red;
position: absolute;
top: 10px;
left: -30px;
}
}
</style>
</head>
<body>