前端切图布局,简单的切图模块划分

本文详细介绍了如何使用HTML和CSS来创建一个包含多个内容区域的响应式网页布局,通过浮动元素和相对定位实现左中右及底部区域的精确对齐。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

效果
在这里插入图片描述
HTML部分

<div class="box">
    <divclass="left fl">
        left
    </div>
    <div class="content fl">
        <div class="con1 fl">
            内容左侧
        </div>
        <div class="con2 fl">
            <ul>
                <li>1</li>
                <li>2</li>
                <li>3</li>
                <li>4</li>
            </ul>
        </div>
        <div class="con3 fl">内容右侧</div>
        <div class="line fl">内容底部</div>
    </div>
</div>

CSS部分

*{margin: 0;padding: 0;}
.fl{float: left;}
.box{width: 1200px;height: 600px;margin: 0 auto;}
.left{width: 200px;height: 600px;background: #abcdef;}
.content{width: 1000px;position: relative;}
.content .con1{width: 200px;height: 500px;background: pink;}
.content .con2{width: 600px;height: 500px;background: greenyellow;}
.content .con2 ul li{float: left;width: 300px;height: 250px;}
.content .con3{width: 200px;height: 600px;background: burlywood;}
.content .line{width: 800px;height: 100px;position: absolute;left: 0;bottom: 0;background: blueviolet;}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值