<div class="container">
    <!-- 三角形 -->
    <div class="traingle"></div>
    <!-- 切角 -->
    <div class="notching"></div>
    <!-- 梯形 -->
    <div class="trapezoid"></div>
    <!-- 五边形 -->
    <div class="pentagon"></div>
    <!-- 六边形 -->
    <div class="hexagon"></div>
    <!-- 八边形 -->
    <div class="octagon"></div>
    <!-- star -->
    <div class="star"></div>
    <!-- 六角星 -->
    <div class="sixstar"></div>
    <!-- 八角星 -->
    <div class="eightstar"></div>
    <!-- 十二角星 -->
    <div class="twelvestar"></div>
    <!-- 椭圆 -->
    <div class="ellipse"></div>

</div>
.container {
    width: 200px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 10px;
}

.container > div {
    margin: 40px auto;
    // background: yellowgreen;
}

.traingle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid yellowgreen;
}

.notching {
    width: 40px;
    height: 40px;
    padding: 40px;
    background: linear-gradient(135deg, transparent 15px, yellowgreen 0) top left,
        linear-gradient(-135deg, transparent 15px, yellowgreen 0) top right,
        linear-gradient(-45deg, transparent 15px, yellowgreen 0) bottom right,
        linear-gradient(45deg, transparent 15px, yellowgreen 0) bottom left;
    background-size: 50% 50%;
    background-repeat: no-repeat;
}

 .trapezoid{
    position: relative;
    width: 60px;
    padding: 60px;
}

.trapezoid::before{
    content:"";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transform:perspective(20px) scaleY(1.3) rotateX(5deg);
    transform-origin: bottom;
    background:yellowgreen;
}

.pentagon {
    position: relative;
    width: 60px;
    margin-bottom: 100px!important;
    border-bottom: 60px solid yellowgreen;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent; 
}

.pentagon::before {
    content:"";
    position: absolute;
    border-top: 60px solid yellowgreen;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    top: 60px;
    left: -40px;
}

.hexagon {
    position: relative;
    width: 60px;
    margin-bottom: 120px!important;
    border-bottom: 60px solid yellowgreen;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
}
.hexagon::before {
    content: "";
    position: absolute;
    width: 60px;
    height: 0px;
    top: 60px;
    left: -40px;
    border-top: 60px solid yellowgreen;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
}

.octagon {
    position: relative;
    width: 40px;
    height: 100px;
    background: yellowgreen;
}
.octagon::before {
    content: "";
    height: 60px;
    position: absolute;
    top: 0;
    left: 40px;
    border-left: 30px solid yellowgreen;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
}
.octagon::after {
    content: "";
    height: 60px;
    position: absolute;
    top: 0;
    left: -30px;
    border-right: 30px solid yellowgreen;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
}

.star {
   margin: 50px 0;
   position: relative;
   width: 0;
   border-right: 100px solid transparent;
   border-bottom: 70px  solid yellowgreen;
   border-left: 100px solid transparent;
   transform: rotate(35deg) scale(.6);
}
.star:before {
    content: '';
    position: absolute;
    border-bottom: 80px solid yellowgreen;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    top: -45px;
    left: -65px;
    transform: rotate(-35deg);
}
.star:after {
    content: '';
    position: absolute;
    color: yellowgreen;
    top: 3px;
    left: -105px;
    border-right: 100px solid transparent;
    border-bottom: 70px solid yellowgreen;
    border-left: 100px solid transparent;
    transform: rotate(-70deg);
}

.sixstar {
    position: relative;
    width: 0;
    margin-bottom: 100px!important;
	border-left: 50px solid transparent;
	border-right: 50px solid transparent;
	border-bottom: 100px solid yellowgreen;
}
.sixstar:after {
    content: "";
    position: absolute;
	border-left: 50px solid transparent;
	border-right: 50px solid transparent;
	border-top: 100px solid yellowgreen;
	top: 30px;
	left: -50px;
}

.eightstar {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 100px!important;
    background-color: yellowgreen;
    transform: rotate(30deg);
}

.eightstar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    transform: rotate(45deg);
    background-color: yellowgreen;
}

.twelvestar {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 100px!important;
    background-color: yellowgreen;
    transform: rotate(30deg);
}

.twelvestar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    transform: rotate(30deg);
    background-color: yellowgreen;
}

.twelvestar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    transform: rotate(60deg);
    background-color: yellowgreen;
}

.ellipse {
   width: 120px;
   height: 160px;
   background-color: yellowgreen;
   border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.