How to stretch the image in width and height so that it would always be at 100% of the width and height of the page (or up to the specified size). The result should look something like this:
https://unsplash.com/photos/bEbwgH6wP6Y
If there are any scripts for this or general advice, I will be glad to hear.

  • one
    div with your picture, back {height: 100%; width: 100%; background-position: center center; background-repeat: no-repeat; background-size: cover; background-image: url (" images.unsplash.com/… );} - Jean-Claude

1 answer 1

body{ width: 100%; height: 100%; } div{ background-image: url("images.unsplash.com/…) no-repeat; background-size: cover; width: 100% !important; height: 100% !important; }