SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>布局综合实例</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: "Microsoft YaHei", sans-serif;
            background-color: #f0f0f0;
            padding: 15px;
            height: 100vh;
            display: flex;
        }

        .container {
            display: flex;
            flex-direction: column;
            width: 100%;
            height: 100%;
            background-color: #fff;
            border: 1px solid #999;
        }

        .header {
            background-color: #e2e2e2;
            padding: 15px;
            font-size: 22px;
            font-weight: bold; 
            color: #333;
            border-bottom: 1px solid #ccc;
        }

        .nav {
            display: flex;
            justify-content: space-around;
            background-color: #888888;
            padding: 12px 0;
        }

        .nav a {
            color: #ffffff;
            text-decoration: none;
            font-size: 16px;
        }

        .main-content {
            flex: 1;
            display: grid;
            grid-template-columns: 150px 1fr 1fr;
            grid-template-rows: 1fr 1fr;
            background-color: #a0c4ff;
            gap: 1px;
        }

        .main-content > div {
            padding: 15px;
            font-size: 16px;
            font-weight: bold;
            color: #333;
        }

        .sidebar1 {
            grid-column: 1 / 2;
            grid-row: 1 / 2;
            background-color: #ffffff; 
        }

        .sidebar2 {
            grid-column: 1 / 2;
            grid-row: 2 / 3;
            background-color: #ffffff;
        }

        .content1 {
            grid-column: 2 / 3;
            grid-row: 1 / span 2;
            background-color: #f4f4f4;
        }

        .content2 {
            grid-column: 3 / 4;
            grid-row: 1 / span 2;
            background-color: #f4f4f4;
        }

        .footer {
            background-color: #888888; 
            color: #000000; 
            font-weight: bold;
            padding: 15px;
            font-size: 16px;
        }
    </style>
</head>
<body>

<div class="container">
    <header class="header">布局综合实例</header>
    
    <nav class="nav">
        <a href="#">首页</a>
        <a href="#">新闻中心</a>
        <a href="#">资料中心</a>
        <a href="#">媒体聚焦</a>
        <a href="#">专题学习</a>
        <a href="#">专题活动</a>
        <a href="#">关于我们</a>
    </nav>

    <main class="main-content">
        <div class="sidebar1">侧边栏1</div>
        <div class="sidebar2">侧边栏2</div>
        <div class="content1">主体内容1</div>
        <div class="content2">主体内容2</div>
    </main>

    <footer class="footer">版权声明</footer>
</div>

</body>
</html>