zoukankan      html  css  js  c++  java
  • 纯CSS实现Div高度根据自适应宽度(百分百调整)

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title>纯CSS实现Div高度根据自适应宽度(百分百调整)</title>
    
        </head>
        <style>
            .father {
                width: 100px;
                height: 100px;
                background: #222
            }
            
            .element {
                width: 50%;
                height: 0;
                padding-bottom: 50%;
                background: #eee;
            }
        </style>
    
        <body>
            <div class="father">
                <div class="element">
    123
                </div>
            </div>
        </body>
    
    </html>
  • 相关阅读:
    053364
    053363
    oracle导出批量表N行记录
    053362
    053361
    053360
    053359
    053358
    053357
    053356
  • 原文地址:https://www.cnblogs.com/yiweiyihang/p/8807248.html
Copyright © 2011-2022 走看看