纯css背景图片自动宽高铺满屏

纯css背景图片自动宽高铺满屏

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>纯css背景图片自动宽高铺满屏</title>
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }

        html {
            height: 100%;
        }

        body {
            background: #ebebeb;
            background-image: url(./background.png);
            background-repeat: no-repeat;
            background-size: 100% 100%;
            background-position: center;
            min-height: 100%;
            height: auto !important;
            height: 100%;
        }
    </style>
</head>
<body>
</body>
</html>

上一篇:C# 去掉GUID的小横线

下一篇:配置一下让GIT记住密码账号