【发布时间】:2013-04-09 05:34:23
【问题描述】:
图像没有出现在我的本地主机上。这是HTML代码。我尝试了几种变体来显示图像。使用 Twitter 引导程序。任何帮助将不胜感激。
<div class="media">
<a class="pull-left" href="">
<img class="media-object" src="/img/grads.jpg/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Collaborate with students at other Universities</h4>
<p>Join your classes and work with other students on studying without having to meet up.</p>
</div>
</div>
<div class="media">
<a class="pull-left" href="">
<img class="media-object" src="grads.jpeg/64x64">
</a>
<div class="media-body">
<h4 class="media-heading">Meet new friends you're in class with</h4>
<p>Pick who you want to be a stranger in your own classes. School is social and so is moreo. : )</p>
</div>
</div>
这是 CSS 代码。不知道我做错了什么。
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 10px;
padding-bottom: 20px;
}
/* Custom container */
.container-narrow {
margin: 0 auto;
max-width: 700px;
}
.container-narrow > hr {
margin: 30px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 30px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 72px;
line-height: 1;
}
.jumbotron .btn {
font-size: 15px;
padding: 10px 20px;
}
/* Supporting marketing content */
.marketing {
margin: 5px 0;
}
.marketing p + h4 {
margin-top: 14px;
}
</style>
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
【问题讨论】:
-
您可以通过IP查看图片吗?图像路径末尾的 /64x64 是什么?
-
如果您有 Chrome 或 Firebug,您是否看到为图像文件发送的 HTTP 请求,如果有,它们是否返回?
-
另外,当您说 localhost 时,您是指本地 LAMP 堆栈还是仅指 html 文件:// 方案?