Reputation: 67
Can someone please let me know what the 20% does in the following style?!
background: url('header.jpg') no-repeat 20%;
padding:500px 0;
background-size: cover;
background-attachment: fixed;
Thanks.
Upvotes: 0
Views: 39
Reputation: 208002
It sets the background-position-x
property of the background image 20%, which moves the image to the right by 20%. Although using it with background-size: cover
and background-attachment: fixed
doesn't make a lot of sense.
See https://developer.mozilla.org/en-US/docs/Web/CSS/background-position
Upvotes: 0
Reputation: 2900
it should be position of background image:
background: color image position/size repeat origin clip attachment initial|inherit;
http://www.w3schools.com/cssref/css3_pr_background.asp
Upvotes: 1