1. 程式人生 > >CSS 背景圖片全屏顯示

CSS 背景圖片全屏顯示

<style>
   html {
       background: url(./static/login/xia.jpg) no-repeat center center fixed;
       -webkit-background-size: cover;
       -moz-background-size: cover;
       -o-background-size: cover;
       background-size: cover;
    }
</style>

參考地址:

https://css-tricks.com/perfect-full-page-background-image/