css設定全螢幕背景圖片的方法:可以利用background屬性和overflow屬性來進行設定,如【overflow:hidden; background-position:center center;】。
body、html設定
(學習視訊分享:)
html,body{ height: 100%; }
圖片所在div設定
.wrapper{ background:#000000 url("../../img/login/login.jpg"); background-attachment: fixed; background-repeat: no-repeat; background-position: center center; background-size: cover; overflow: hidden; }
相關推薦:
以上就是css怎麼設定全螢幕背景圖片的詳細內容,更多請關注TW511.COM其它相關文章!