Y
Y
Yuri Denisov2013-12-04 13:53:44
PHP
Yuri Denisov, 2013-12-04 13:53:44

How to set background image in domPDF?

Does anyone know how to set a background image in domPDF? Tried to set background via css does not display. Is there any solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Fedoev, 2013-12-04
@denissov

try

html {
       background: url(images/bg.jpg) no-repeat center center fixed;
       -webkit-background-size: cover;
       -moz-background-size: cover;
       -o-background-size: cover;
       background-size: cover;
}

or so
body {
    background-image: url(images/bg.jpg); /* Путь к фоновому изображению */
    background-color: #c7b39b; /* Цвет фона */
   }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question