我的五星红旗

我的五星红旗

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div.container {
            width: 870px;
            height: 580px;
            margin: 0 auto;
            background-color: red;
            position: relative;
        }
        div.center {
            display: block;
            width: 0px;
            height: 0px;
            border-top: 64px solid yellow;
            border-left: 85px solid transparent;
            border-right: 85px solid transparent;
            position: absolute;
            left: 64px;
            top: 124px;
        }
        div.center::before,
        div.center::after {
            display: block;
            content: "";
            width: 0px;
            height: 0px;
            border-top: 64px solid yellow;
            border-left: 85px solid transparent;
            border-right: 85px solid transparent;
            position: absolute;
            left: -85px;
            top: -64px;
        }
        div.center::before {
            transform: rotate(-69deg);
        }
        div.center::after {
            transform: rotate(69deg);
        }
        div.right1 {
            transform: translate(130px, -80px) scale(0.2) rotate(30deg);
        }
        div.right2 {
            transform: translate(160px, -30px) scale(0.2) rotate(-30deg);
        }
        div.right3 {
            transform: translate(160px, 30px) scale(0.2) rotate(0deg);
        }
        div.right4 {
            transform: translate(130px, 80px) scale(0.2) rotate(30deg);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="center">
        </div>
        <div class="center right1">
        </div>
        <div class="center right2">
        </div>
        <div class="center right3">
        </div>
        <div class="center right4">
        </div>
    </div>
</body>
</html>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕星星 2019-12-23 17:58:10

同学你好,代码实现效果很棒!继续加油,祝学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师