我已使用以下 css文件bg.jpg
以repeat-x repeat-y
.dots.png
*{
margin: 0;
padding: 0;
}
body {
margin: 0px;
padding: 0px;
color: #666;
font-family: comfortaa;
font-size: 13px;
line-height:1.5em;
background-color: #fff;
width: 100%;
height: 100%;
background: url(../images/bg.jpg) no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#header {
width: 100%;
height: 17%;
background: url(../images/header.png) no-repeat;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size: contain;
}
#dots{
width:100%;
height:100%;
position:fixed;
top:0px;
left:0px;
background:transparent url(../images/dots.png) repeat-x repeat-y top left;
opacity:0.6;
}
然后我像这样编写了 index.php:
<html>
<head>
<title>My test page</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
</head>
<body>
<div id="header"></div>
Under Construction
<div id="dots"></div>
</body>
</html>
但模式没有重叠。我能做些什么来解决这个问题?请帮忙。