我有一个网站,我正在忙着创建但是当我上传我的网站时,一张图片没有显示。这是代码
<div id="adbox">
<div class="clearfix">
<img src="images/family-large.jpg" alt="Img" height="382" width="594">
<div class="detail">
<h1>Implementing Strategic and Effective Legal Solutions</h1>
</div>
</div>
</div>
和css如下
.clearfix {
width: 960px;
margin: 0 auto;
}
.clearfix:after {
clear:both;
content:"";
display:block;
line-height:0;
height:100%;
}
答案 0 :(得分:0)
您的图片路径不正确。您可以通过加载您知道可以使用的图像轻松地测试它。 Lorem Flickr非常适合测试:
.clearfix {
width: 960px;
margin: 0 auto;
}
.clearfix:after {
clear:both;
content:"";
display:block;
line-height:0;
height:100%;
}
&#13;
<div id="adbox">
<div class="clearfix">
<img src="http://www.loremflickr.com/382/594" alt="Img" height="382" width="594">
<div class="detail">
<h1>Implementing Strategic and Effective Legal Solutions</h1>
</div>
</div>
</div>
&#13;