<!doctype html>
<html>
<head>
<title>抬头</title>
<meta charset="utf-8">
<style>
.InternalStyle1
{
width:660px;height:660px;
background:green center bottom no-repeat url("dragon.png");
<!注意再上面的换行里面不能添加注释>
<!repeat 重复 no-repeat 不重复 repeat-x 横向重复 repeat-y 纵向重复>
<!background:green url("dragon.png") no-repeat 220px 110px; 图片右移220px 下移110px>
<!x轴 left center right>
<!y轴 top center bottom>
}
</style>
<style>
.InternalStyle2
{
width:400px;
height:660px;
background-color: aquamarine;
background-image: url("dragon.png");
background-repeat: repeat-y;
background-position: center;
}
</style>
<style>
#InternalStyle3
{
width:600px;
height:1500px;
background-color:bisque;
background-image: url("dragon.png");
background-repeat: repeat-y;
background-position: left;
background-attachment: fixed;
/*fixed 不滚动 scroll 滚动*/
}
</style>
<link href = "main.css" rel = "stylesheet">
</head>
<body>
<!属性:属性值(属性单位)>
<div style = "width:300px;height:100px;background:red">inline style1 行内样式1</div>
<div class = "InternalStyle1">Internal Style1 内部样式1</div>
<div class = "InternalStyle2"></div>
<div id = "InternalStyle3"></div>
<div class = "ExternalStyle1">External Style1 外部样式1</div>
</body>
</html>