常见的网页布局

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        li {
            list-style: none;
        }
        .top {
            height: 50px;
            background-color: black;
        }
        .banner {
            width: 980px;
            height: 150px;
            margin: 10px auto;
           background-color: black;
        }
        .box {
            width: 980px;
            height: 300px;
            background-color: black;
            margin: auto;
        }
        .box li {
            float: left;
            width: 237px;
            height: 300px;
            background-color: red;
            margin-right: 10px;
        }
        .box .last {
            margin: 0;
        }
        .footer {
            height: 300px;
            background-color: black;
            margin-top: 10px;
        }
    </style>
</head>
<body>
    <div class="top">top</div>
    <div class="banner">banner</div>
     <ul class="box">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li class="last">4</li>
     </ul>
    <div class="footer"></div>
</body>
</html>
上一篇:[游记] CSP-S游记


下一篇:UML实践(时序图)-20211122