How do I put 3 backgrounds together?

1

It's as follows, I have a div with id="1". And I have 3 images, with 20 pixels each that I want to be my backgrounds, but I want my div to have the 3 backgrounds, one on the left side of the other. In other words, barely finishes one, the other begins at your side.

How can I do this?

Thank you.

    
asked by anonymous 16.03.2017 / 16:42

1 answer

1

You can use the background for this purpose, as in the following example

body {
    background: url("https://dummyimage.com/210x200/1eff00/fff&text=imagem+1") left top,
    url("https://dummyimage.com/210x200/0062e3/fff&text=imagem+2") center top no-repeat,
    url("https://dummyimage.com/210x200/f7c600/fff&text=imagem+3") right top no-repeat;
    
    background-repeat:no-repeat;   
    background-color: #cccccc;
}

Original code from here .

    
16.03.2017 / 18:37