background-color
background-image
background-repeat
background-attachment
background-position
<!DOCTYPE html>
<html>
<head>
<style>
h2,p{
background-color:#b0d4de;
}
</style>
</head>
<body>
<h2>我的第一个css页面.</h2>
<p>Hello Bianchenghao6. 这是 background-color的例子。</p>
</body>
</html>
Hello Bianchenghao6。这是CSS background-color的示例。
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("paper1.gif");
margin-left:100px;
}
</style>
</head>
<body>
<h1>Hello Bianchenghao6.com</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("gradient_bg.png");
background-repeat: repeat-x;
}
</style>
</head>
<body>
<h1>Hello Bianchenghao6.com</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("gradient_bg.png");
background-repeat: repeat-y;
}
</style>
</head>
<body>
<h1>Hello Bianchenghao6.com</h1>
</body>
</html>
background: white url('bbb.gif');
background-repeat: no-repeat;
background-attachment: fixed;
center
top
bottom
left
right
background: white url('good-morning.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;