html css五星红旗,利用css3转换transform画五星红旗

Document

*{

padding:0;

margin:0;

}

section {

width: 300px;

height: 200px;

background-color: red;

margin: 50px auto;

}

.contain {

width: 30px;

height: 30px;

position: relative;

}

.star {

width:0;

height:0;

border-left: 15px solid transparent;

border-right: 15px solid transparent;

border-bottom: 10px solid yellow;

position: relative;

transform: rotate(35deg);

}

.star::before {

content:"";

display: block;

width:0;

height:0;

border-left: 15px solid transparent;

border-right: 15px solid transparent;

border-bottom: 10px solid yellow;

position: absolute;

transform: rotate(70deg);

left:-15px;

}

.star::after {

content:"";

display: block;

width:0;

height:0;

border-left: 15px solid transparent;

border-right: 15px solid transparent;

border-bottom: 10px solid yellow;

position: absolute;

transform: rotate(145deg);

left:-15px;

}

.contain .small {

transform: scale(0.6);

}

.contain .big {

top: 18px;

left: 30px;

transform: rotate(-35deg) scale(2);

}

.contain .small1 {

left: 76px;

top: 14px;

}

.contain .small2 {

left: 90px;

top:-24px;

}

.contain .small3 {

left: 90px;

top:-30px;

}

.contain .small4 {

left: 78px;

top:-37px;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值