G
G
GoodProject2015-10-02 10:38:30
css
GoodProject, 2015-10-02 10:38:30

How to make 2 backgrounds with bg:cover?

How to make 2 backgrounds so that the 1st image has the property bg:cover ?
I want to make a section with bg, and inside it has one more bg in the center, if you do it through multibg, then bg:cover does not work .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mr Crabbz, 2015-10-02
@GoodProject

div {
    background-image: url(01.png), url(z.jpg);
    background-size: 100% 100%, cover;
}

More or less like this. Through a comma, in general.

G
GoodProject, 2015-10-02
@GoodProject

I found a solution, but I don't know how correct it is.
In general, there is 1 block section , he was given number 1 bg .
Inside I placed one more block , he was given an absolute pose. and bg number 2 .
That is, section serves as a wrapper for block number 2 and they calculate the position from it.
Everything seems to be working.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question