我无法相信我在努力使背景图像变得有效。 它应该很容易,但由于某种原因它不会出现。我可以做背景色:红色;并且背景将为红色,但背景图像:url('backgroundpic.png')不会出现。那是为什么?
CSS
body
{
overflow-x: hidden;
background-image: url('backgroundpic.png');
}
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Site Demo</title>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="css/header.css" rel="stylesheet" type="text/css">
<link href="css/mainPage.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<div class="row">
<div class="header">
<!--<div class='col-md-2'>-->
<!--</div>
<div class="row row-centered">
<div class='col-md-6 col-md-offset-1 col-centered"'>
<div class='form-inline'>-->
</div>
</div>
</div>
<!--
</div>
</div>
</div>
-->
<div class="container">
<div class='underHeader'></div>
</div>
<div class="container">
</div>
<div id="footer"></div>
<script src="js/jquery-1.10.1.min.js" type="text/javascript"></script> <!--<script src="js/jquery.easing-1.3.js"></script>-->
<script src="js/bootstrap.js"></script> <script src="js/menu.js"></script> <script src="js/app.js" type="text/javascript"></script>
</body>
</html>