background

英[?b?kgra?nd] 美[?b?k?ɡra?nd]

n.(?? ?) ???; ?? ??; ?z?n ] 美[ p??z???n]

n. ??, ??, ??

vt. ??... ??? ???...; ??: position ????: positioning ????: position ????: position

CSS ?? ?? ?? ???

?? ?? ??? ??? ??????

background-position ??? ?? ???? ?? ??? ??? ? ????. ??? ??? ????. background-position: x y, ??? x? ?? ??? ???? y? ?? ??? ?????. ?? ?? ?? ?, 3% 2%, xpos ypos? ?? x? y? ?? ???? ??? ????. .

??: ?? ???? ?? ??? ?????.

??: ? ??? ?? ???? ??? ?? ?? ???? ??? ???????. ?? ???? ???? ?? ? ???? ?????.

??: ? ??? Firefox ? Opera?? ??? ????? ??? ?? ?? ??? "??"?? ???? ???.

??? ? ?? ?:

? ??? ???? ???? ?? ? ?? ?? "center"? ???. x% y% ? ?? ?? ?? ???? ? ?? ?? ?? ?????. xpos ypos ? ?? ?? ?? ???? ? ?? ?? ?? ?????.

CSS ?? ?? ?? ?

<html>
<head>
<style type="text/css">
body
{ 
  background-image:url('http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg');
  background-repeat:no-repeat;
  background-attachment:fixed;
  background-position:center;
}
</style>
</head>

<body>
<body>
<p><b>提示:</b>您需要把 background-attachment 屬性設(shè)置為 "fixed",才能保證該屬性在 Firefox 和 Opera 中正常工作。</p>
</body>
</body>
</html>

???? ?? ?

??? ????? ??? "???? ??" ??? ?????

<li id="l80i9"><tbody id="l80i9"></tbody></li>

? ??

top center

top right

center left

center center

center right

?? ??

?? ??

??? ??

???: 0% 0%.

?? ??? 0% 0% ???. ??? ??? 100% 100%???.

??? ?? ???? ?? ?? 50%? ???.


?? ??? 0 0 ???. ??? ??(0px 0px) ?? ?? CSS ?????.

??? ?? ???? ?? ?? 50%? ???.

%? ?? ?? ??? ? ????.

    <label id="l80i9"></label>