首页 > 代码库 > 背景图片的自定义

背景图片的自定义


body:


.landing-bg {  height: 100%;  background: url(背景链接地址) no-repeat;  -webkit-background-size: cover;  -moz-background-size: cover;  -ms-background-size: cover;  -o-background-size: cover;   background-size: cover;  overflow: hidden;}



Div上定义背景图片

.s-skin-container {

position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: -10;
background-position: center 0;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
-webkit-background-size: cover;
-o-background-size: cover;
zoom: 1;

}

 

 

背景图片的自定义