• css 脱离文档流


    一、float

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>脱离文本流</title>
        <style>
            .c1{
                height: 100px;
                width: 100px;
                background-color: brown;
            }
    
            .c2 {
                height: 150px;
                width: 150px;
                background-color: blueviolet;
                float: right;
            }
    
            .c3 {
                height: 200px;
                width: 200px;
                background-color: red;
            }
        </style>
    </head>
    <body>
    <div class="c1"></div>
    <div class="c2"></div>
    <div class="c3"></div>
    </body>
    </html>

    二、absolute

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>脱离文本流</title>
        <style>
            .c1{
                height: 100px;
                width: 100px;
                background-color: brown;
            }
    
            .c2 {
                height: 150px;
                width: 150px;
                background-color: blueviolet;
                position: absolute;
                left: 200px;
            }
    
            .c3 {
                height: 200px;
                width: 200px;
                background-color: red;
            }
        </style>
    </head>
    <body>
    <div class="c1"></div>
    <div class="c2"></div>
    <div class="c3"></div>
    </body>
    </html>

    三、fixed

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>脱离文本流</title>
        <style>
            .c1{
                height: 100px;
                width: 100px;
                background-color: brown;
            }
    
            .c2 {
                height: 150px;
                width: 150px;
                background-color: blueviolet;
                position: fixed;
                left: 400px;
            }
    
            .c3 {
                height: 200px;
                width: 200px;
                background-color: red;
            }
        </style>
    </head>
    <body>
    <div class="c1"></div>
    <div class="c2"></div>
    <div class="c3"></div>
    </body>
    </html>
  • 相关阅读:
    Sql Server 2016 创建内存数据库
    SQL 系统表应用
    EF 编程经验
    JSP JDBC 读取SQL Server 数据2
    JSP 使用 JDBC连接SQL Server
    JSP 用poi 读取Excel
    解析SQL中的包含的列和表
    dotnet core 入门
    <<你的灯亮着吗?>>读书笔记
    需求分析过程工具产物表
  • 原文地址:https://www.cnblogs.com/wt7018/p/11143750.html
Copyright © 2020-2023  润新知