开发者

background-position not working if #color instead of image

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜