我正在创建一个单页滚动站点,我想将图像用作主页的背景。我已经尝试了几种方法,但我似乎无法获得图像前面的内容,只能在它下面。
<meta charset="utf-8">
<style>
body {
background: url(img/bg.jpg) no-repeat;
background-size: 100%;
}
</style>
<title>Digital Portfolio</title>
<meta name="description" content="Portfolio of my work">
<meta name="keywords" content="Sara Cook, portfolio, digital media">
<meta name="author" content="Sara Cook">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<link href="img/favicon.ico" rel="shortcuticon"/>
<link href="img/apple-touch-icon.png" rel="apple-touch-icon"/>
<link href="img/apple-touch-icon-72x72.png" rel="apple-touch-icon"sizes="72x72"/>
<link href="img/apple-touch-icon-114x114.png" rel="apple-touch-icon"sizes="114x114"/>
<link href="img/apple-touch-icon-144x144.png" rel="apple-touch-icon"sizes="144x144"/>
<link rel="stylesheet" href="css/base.css"/>
<link rel="stylesheet" href="css/skeleton.css"/>
<link rel="stylesheet" href="css/custom-style.css"/>
</head>
<body>