How to add two background images - left and right from center column

后端 未结 3 2061
面向向阳花
面向向阳花 2021-02-08 21:44

I have this css:

#wrapper1 {
min-width:1020px;
min-height:100%;
}
#wrapper2 {
height:100%; 
background: url(\'img1.jpg\')         


        
3条回答
  •  粉色の甜心
    2021-02-08 22:24

    This is a working code for me. the only thing will be change is the background-position for both property.

    .image-bg-custom1 {
        background-image: url(/images/left-get.png);
        background-repeat: no-repeat;
        background-position: center left;
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;
    }
    
    .image-bg-custom2 {
        background-image: url(/images/right-get.png);
        background-repeat: no-repeat;
        background-position: center right;
        height: 100%;
        right: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;
    }
    

提交回复
热议问题