请老师检查一下
来源:2-8 编程练习
weixin_慕先生7015352
2020-06-23 18:49:37
<html>
<head>
<meta charset="utf-8">
<title>2-3</title>
<style type="text/css">
/* 此处写代码*/
.big{
width:300px;
height:200px;
background:red;
}
.star{
width:0;
height:0;
border-left:30px solid transparent;
border-right:30px solid transparent;
border-top:20px solid yellow;
position:absolute;
left:30px;
top:50px;
}
.star::before{
display:block;
content:"";
width:0;
height:0;
border-left:30px solid transparent;
border-right:30px solid transparent;
border-top:20px solid yellow;
position:absolute;
left:-30px;
top:-20px;
transform:rotate(-144deg);
}
.star::after{
display:block;
content:"";
width:0;
height:0;
border-left:30px solid transparent;
border-right:30px solid transparent;
border-top:20px solid yellow;
position:absolute;
left:-30px;
top:-20px;
transform:rotate(-70deg);
}
.two{
position:absolute;
left:80px;
top:25px;
transform:scale(.4) rotate(-45deg);
}
.three{
position:absolute;
left:105px;
top:45px;
transform:scale(.4) rotate(45deg);
}
.four{
position:absolute;
left:105px;
top:80px;
transform:scale(.4) ;
}
.five{
position:absolute;
left:80px;
top:100px;
transform:scale(.4) rotate(45deg);
}
</style>
</head>
<body>
<!-- 此处写代码 -->
<div class="big">
<div class="star one"></div>
<div class="star two"></div>
<div class="star three"></div>
<div class="star four"></div>
<div class="star five"></div>
</div>
</body>
</html>
1回答
好帮手慕慕子
2020-06-23
同学你好,代码实现是对的,继续加油,祝学习愉快~
相似问题