0

I noted that a backgorund image is bigger than browser window, and it's positioned at some percentage, his assume a position that start out of the screen... Check this page

the background of the left column is a gif of 2000px, and this is the CSS rule

div#container{min-width: 550px;background: #FFF url(leftP.gif) repeat-y 25%}

In a normal/logical situation, the image should be positioned at (window size*25)/100 pixel, but in this case the image seems positioned in a negative coordinate (es. -50px)

So, when the image is bigger than window size, what the position expressed in percentage refers to? What's the formula that the HTML apply?

4

1 回答 1

0

我想你想要背景大小属性:

http://www.w3schools.com/cssref/css3_pr_background-size.asp

在您上面的示例中,25% 将适用于定位,而不是大小。

于 2012-08-02T12:01:24.130 回答