CSS Property Value - 如何使用background-attachment: fixed
我們想知道如何使用background-attachment: fixed。
<html>
<head>
<style>
body {
background-image: url("http://w3cschool.cn/style/download.png");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-color: #eaeaea;
}
</style>
</head>
<body>
<p>This example illustrates the <b>background-attachment</b> property<p>
<p>The<br />
image<br />
stays<br />
in<br />
the<br />
same<br />
place<br />
even<br />
when<br />
you<br />
scroll<br />
down<br />
the<br />
page.</p>
</body>
</html>