Domanda

I want to apply a background image to my web page so that it covers the whole page. But the image height is bigger than the page height and I want the bottom of the image to align with the bottom of the page. Is it possible? Here's the technique I'm using so far, which doesn't make this bottom alignment:

background-image:url(background.jpg);
background-repeat:no-repeat;
background-size:cover;

I tried to add center bottom after url() but it doesn't work.

È stato utile?

Soluzione

I think you can use background-position to accomplish what you want. How to use it: http://www.w3schools.com/cssref/pr_background-position.asp

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top