css设置三角形

效果:

 

 

代码:

 

 

 

.couponbox1_left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
color: rgba(255,255,255,.9);
font-size: 60rpx;
margin-left: 14rpx;
border-radius: 4rpx;
width: 250rpx;
height: 250rpx;
background-color: #169A51;
margin-right: 16rpx;
position: relative;
}
.couponbox1_left::before {
position: absolute;
content: '';
border-top: 130rpx solid rgba(255,255,255,.2);
border-left: 130rpx solid rgba(255,255,255,.2);
border-bottom: 130rpx solid rgba(0,0,0,0);
border-right: 130rpx solid rgba(0,0,0,0);
}

 

posted @ 2022-04-21 09:45  宅女二二  阅读(66)  评论(0)    收藏  举报