开发者

background-position not working if #color instead of image

开发者 https://www.devze.com 2023-03-28 21:12 出处:网络
background:transparent url(../img/fondo_footer.pn开发者_如何转开发g) repeat-x scroll; background-position: 0px 140px;
background:transparent url(../img/fondo_footer.pn开发者_如何转开发g) repeat-x scroll;
background-position: 0px 140px;

This way the background is vertically moved


background:#01244e;
background-position: 0px 140px;

this way, is not

How can i solve this?


background-position only applies to images according to http://www.w3.org/TR/CSS2/colors.html

So if you supply a color value, it will apply to the whole element.


It doesn't make a sense. Since you're setting the background color, it doesn't matter what position do you set, because the color everywhere the same. If you set the image, then the position means what part of image you're going to show.

0

精彩评论

暂无评论...
验证码 换一张
取 消