zoukankan      html  css  js  c++  java
  • sticky-footers

    第一种方案

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="utf-8">
            <style>
            .clearFix { display: inline-block; }
            .clearFix::after { display: block; content: "."; height: 0; line-height: 0; clear: both; visibility: hidden; }
            .detail { position: fixed; z-index: 100; top: 0; right: 0; width: 100%; height: 100%; overflow: auto; background: rgba(7, 17, 27, 0.8); -webkit-backdrop-filter blur(10px); }
            .detail-wrapper { width: 100%; min-height: 100%; }
            .detail-wrapper .detail-main { margin-top: 64px; padding-bottom: 64px; }
            .detail-close { position: relative; width: 32px; height: 32px; margin: -64px auto 0 auto; clear: both; font-size: 32px; }
            </style>
        </head>
        <body>
        <div class="detail">
            <div class="detail-wrapper clearFix">
                <div class="detail-main">
                    我我我
                </div>
            </div>
            <div class="detail-close">X</div>
    
        </div>
        </body>
    </html>

    第二种方案 flex

    <!doctype html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <title>flex-footer</title>
    </head>
    <style>
    body { margin: 0; display: flex; flex-flow: column; min-height: 100vh; }
    main { flex: 1; }
    header { background: pink; }
    footer { background: #333; color: #fff; }
    </style>
    
    <body>
        <header>
            <h1>header</h1>
        </header>
        <main>
            <p>main</p>
        </main>
        <footer>
            <p>footer</p>
        </footer>
    </body>
    
    </html>
  • 相关阅读:
    测试阅读量
    JS中的 length, var i = [1,2]; i[length], 与 i.length, i["length"]的区别
    微信小程序:button组件的边框
    mongo学习笔记
    C言语语法总结(随时更新)
    Vim 常用命令总结
    php 文件操作
    git常用命令
    递归方式转迭代方式
    ECMAScript6 ES6 ES2015新语法总结
  • 原文地址:https://www.cnblogs.com/Doduo/p/7423813.html
Copyright © 2011-2022 走看看