我有一个正在忙于创建的网站,但是当我实时上传我的网站时,一张图片没有显示。这是代码
<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>
and the css is as follows
.clearfix {
width: 960px;
margin: 0 auto;
}
.clearfix:after {
clear:both;
content:"";
display:block;
line-height:0;
height:100%;
}
最佳答案
您的图像路径不正确。您可以通过加载您知道可以使用的图像来轻松地对此进行测试。 Lorem Flickr 非常适合测试这个:
.clearfix {
width: 960px;
margin: 0 auto;
}
.clearfix:after {
clear:both;
content:"";
display:block;
line-height:0;
height:100%;
}
<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>
关于html - 图片未显示在 html 实时网站中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39768761/