CSS 網頁背景圖片設置

<!DOCTYPE html>
<html> 
    <head>
        <meta charset="utf-8">
        <style>
            #login_background{ 
                /* div位置及大小,所在堆疊層設置 */
                position: fixed;
                top:0;
                left: 0;
                width: 100%;
                height: 100%;
                min-width: 1000px;
                z-index: -10;
                /* 背景圖片設置 */
                background-image: url(20190712.jpg);
                zoom: 1;
                background-color: #ffff;
                background-repeat: no-repeat;
                background-position: center 0;
                background-size: cover;
                -webkit-background-size: cover;
                -o-background-size: cover;
            }

        </style>
    </head>
    <body>
        <div id="web_content">
            <div id="login_background" alt="圖片路徑不正確"></div>
        </div>      
    </body>
</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章