Setting the background image is clear, bu开发者_如何学运维t how do i set the position for the background-image?
The background-position property, e.g.
background-position:top right;
if you want a background image with no-repeat positioned 10px to the right and 20px from the top
{ backgroud: url(path to image) no-repeat 10px 20px; }
you can use negative values for the position too, eg. -10px to move it 10px to the left
Or you could use shorthand to set everything at the same time!
background:#ffffff url('/images/background.jpg') top right no-repeat;
精彩评论