F
F
Forleyn2015-10-22 22:37:28
css
Forleyn, 2015-10-22 22:37:28

How can I make the image be centered and cropped only by the resolution of the monitor?

How to make the picture cut from the layout located in the center of the screen, it is wide enough and you need the edges to be cut off by the monitor resolution and when the monitor is enlarged, the picture is also positioned, just with a higher resolution, you can see the edges.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2015-10-22
@Taraflex

htmlbook.ru/css/background-size (value cover)
htmlbook.ru/css/background-position

M
Mikhail Osher, 2015-10-23
@miraage

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question