【CSS小练习】DIV+CSS布局画图

博主通过一个CSS小练习尝试复杂布局,分享了代码,发现自己对CSS知识点掌握不熟练,期待进阶并欢迎他人指导。
摘要由CSDN通过智能技术生成

复杂的布局算是css中的一个难点,我做了一个画图小练习,分享代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .hei {
            width: 1315px;
            height: 548px;
            background-color: #000;
        }
        .yue {
            height: 72px;
        }
        .da {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background-color: #fff;
            margin-left: 1245px;
        }
        .xiao {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background-color: #000;
            margin-top: -70px;
            margin-left: 1259px;
        }
        .wu {
            width: 0;
            height: 0;
            border-left: 205px solid transparent;
            border-right: 205px solid transparent;
            border-top: 136px solid transparent;
            border-bottom: 136px solid #0001fe;
            position: relative;
            top: -73px;
            /* 和月亮的距离-bordertop=63-136=-73 */
            left: 342px;
        }
        .yan {
            width: 57px;
            height: 130px;
            background-color: #0001fe;
            position: relative;
            top: -223px;
            /* 底和屋顶底齐平=屋顶的移动距离-烟囱的高度=-73-130=-203
            底和屋顶底齐平+往上抬20px&#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值