C
C
crwbr2015-11-02 16:58:18
css
crwbr, 2015-11-02 16:58:18

How to add an image using CSS when there is already a background?

Hello, there is a block it has a background color, I want to use CSS3 to place an image in this block using only CSS

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
dima_horror, 2015-11-02
@crwbr

for block - position: relative
add :before or :after block with height and width 100% and set background-image to it

L
L0k1, 2015-11-02
@L0k1

background-image why the
hell are you all using a toaster instead of google?

D
Denis Ineshin, 2015-11-02
@IonDen

.block {
    background-image: url(...);
}

Background color: background-color
Background image: background-image
All these parameters can be entered separately, or combined into one common background.

M
mletov, 2015-11-02
@mletov

.block {
    background: url(...) #FFFFFF;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question