Saturday, 15 May 2010

html - Best way to make a resizable background? -


Before doing anything, I will not give any of my codes because I do not want to use it anymore, I want to Rather start with a few new ideas.

I have to create a Div, which is a background image in a newbar and CSS, resizes with each resolution, I use VW and VH Tried to do it, but whenever I try to resolve According to 1280x1024 and 1024x768, the image will keep proportions it but only page width as fill, such as showing a margin or padding up and down ... that VW and VH were not working.

So my question is, what is the best way to resize the background so that the background always fills the page, even if some image is cut out.

Here is an example of a website that I found in the way I was in the same way.

Thank you in advance

  Background-size: cover;  

No comments:

Post a Comment