Print web page

How to print background images in website

The background images in website are not printed while Background graphics checkbox is unchecked by default.

browser_view

How it will print by default…

uncheck_Background_graphics

check_Background_graphics

Apply styles to only print

style_css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
* {
box-sizing: border-box;
font-family: sans-serif;
}

body {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
min-height: 100vh;
background: url('./hoe.png') center center/cover no-repeat;
}

h1 {
color: #fff;
font-size: 10rem;
}

@media only print {
h1 {
color: tomato;
}
}

Emulate with devtool

emulate_css_media_print