背景图片居中全屏自适应显示

.bg{  
    background-size: cover;  
    background-image:url(../assets/images/sunshine.png);  
    background-repeat:no-repeat;  
    background-position:center;  
    background-attachment:fixed;  
}  

  

posted @ 2017-12-13 10:18  code-luyf  阅读(995)  评论(0编辑  收藏  举报