我有一个问题,它驱使我坚果。我开始学习RoR,我不知道为什么我无法在Bootstrap 3应用程序上设置背景图像。我尝试了一切,但图像不“加载”。Bootstrap背景图片3
我用这个网站做的:http://css-tricks.com/perfect-full-page-background-image/
可能是什么做错了什么?
**如果我将html更改为body,则没有任何反应。同样的事情,如果我删除引号或不。
在此先感谢!
更新:**对不起。 Newb错误。图像已损坏。有 问题。感谢所有帮助。
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<style>
html {
background: url('images/fondo.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>
<body>
<h1>Hello, world!</h1>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
有趣的是,如果我使用任何URL图像像voices.suntimes.com/wp-content/uploads/2013/08/...,一切工作正常。问题是与那些在我的电脑图像
您是否在使用导轨? – Philip7899
是@ philip7899,铁轨! –
和我所有的图片都在app/assets/images目录中。 @ Philip7899 –