前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >你知道css圣杯布局与双飞翼布局吗?

你知道css圣杯布局与双飞翼布局吗?

作者头像
马克社区
发布2022-07-27 15:51:13
发布2022-07-27 15:51:13
18100
代码可运行
举报
文章被收录于专栏:高端IT高端IT
运行总次数:0
代码可运行
代码语言:javascript
代码运行次数:0
运行
复制
圣杯布局

<!DOCTYPE html>
<html lang="en">

<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>圣杯布局</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            min-width: 600px;
        }

        header,
        footer {
            text-align: center;
            width: 100%;
            background-color: #bbbbbb;
        }

        .text {
            text-align: center;
            line-height: 200px;
            font-size: 40px;
            color: #fff;
        }

        .bd {
            overflow: hidden;
            padding: 0 200px 0 200px;
        }

        .main {
            float: left;
            width: 100%;
            height: 200px;
            background-color: #ddd;
        }

        .left {
            /* opacity: 0.5; */
            float: left;
            width: 200px;
            height: 200px;
            background-color: #da4242;
            /* 产生布局效果的属性 */
            margin-left: -100%;
            position: relative;
            left: -200px;
        }
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657

更多请见:https://blog.csdn.net/weixin_44519496/article/details/120152697

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档