• 第二周-3:CSS核心技术


    (1)神奇的float;

    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style type="text/css">
            div{
                height: 100px;
                float: left;
            }
            .container{
                border:1px solid blue;
                height: 300px;
                 250px;
                background-color: antiquewhite;
            }
            .first{
                background: red;
            }
            .second{
                background: cyan;
            }
            .third{
                background: chartreuse;
            }
            .n{
                background: darkorchid;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="first">
                第一个div
            </div>
            <div class="second">
                第二个div
            </div>
            <div class="third">
                第三个div
            </div>
            <div class="n">
                第n个div
            </div>
        </div>
    </body>
    </html>

    (2)定位position;

     

    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style type="text/css">
            div{
                height: 100px;
                 100px;
            }
            .rel{
                background: red;
                display: inline-block;
            }
            .abs{
                background: green;
                display: inline-block;
            }
        </style>
    </head>
    <body>
        <div class="rel"></div>
        <div class="abs"></div>
    </body>
    </html>

  • 相关阅读:
    CF991D Bishwock
    CF1010D Mars rover
    NOIP 2011 计算系数
    SDOI 2008 仪仗队
    浅谈欧拉函数
    CF1249F Maximum Weight Subset
    NOIP 2011 铺地毯
    CF707D Persistent Bookcase
    C++ STL bitset 容器详解
    CF798D Mike and distribution
  • 原文地址:https://www.cnblogs.com/zzjeny/p/5813895.html
Copyright © 2020-2023  润新知