zoukankan      html  css  js  c++  java
  • 盒子没有高度时填充背景图片

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <style>
            *{
                margin: 0;
                padding: 0;
            }
            ul,li{
                list-style: none;
            }
            .box{
                 200px;
            }
            .box ul{
                height:auto !important;
                height: 0px; 
                min-height: 0px;
                background: url(./style/img/04_03.png) no-repeat center center;
                -webkit-background-size: 100% 100%;
                background-size: 100% 100%;
            }
            .box ul:after{
                content:"."; 
                height:0; 
                visibility:hidden; 
                display:block; 
                clear:both; 
            }
        </style>
    </head>
    <body>
        <div class="box">
            <ul>
                <li>111</li>
                <li>111</li>
            </ul>
        </div>
    </body>
    </html>
    

      

  • 相关阅读:
    py 5.11
    py 5.10
    py 5.9
    py 5.8
    python 5.7
    python 5.4
    python 5.3
    python 5.2
    python 4.28
    python 4.27
  • 原文地址:https://www.cnblogs.com/xinheng/p/11945123.html
Copyright © 2011-2022 走看看