网站部分加载背景图片 (Bootstrap)
Website partially loading background images (Bootstrap)
我正在构建一个画廊,虽然我的所有代码在 Dreamweaver 中运行良好,但当我将成品上传到我的网站时,只有大约一半的图像显示出来。我已经在 Chrome 和 Internet Explorer 上检查了该站点,并让其他人检查它是否只是我的电脑。
使用此代码将图像加载为背景图像:
.birdzoom {
background-repeat:no-repeat;
background-size:cover;
background-position:center;
}
#bird01 {
background-image: url(../images/thumbs/001.jpg);
}
并显示此代码:
<div class="col-sm-2 imgbox">
<div class="thumb bird birdzoom" id="bird01">
<div class="link" onclick="openModal();currentSlide(1)"></div>
<div class="tags"><a href="purchase.html"><span class="glyphicon glyphicon-tag"></span></a></div>
</div>
<div class="birdname">Name</div>
</div>
前 18 张图片显示正常,我已经四次检查以确保所有图片都使用相同的代码。
在你的样式表中
<link href="css/style.css" rel="stylesheet">
...
#bird01 {
background-image: url(../images/thumbs/001.jpg);
background-repeat:no-repeat;
background-size:cover;
}
#bird02 {
background-image: url(../images/thumbs/002.jpg);
background-repeat:no-repeat;
background-size:cover;
}
...
**you have not set the bird19 to bird58**
#bird19 {
background-image: url(../images/thumbs/019.jpg);
...
**你只设置了图片1到18**
我正在构建一个画廊,虽然我的所有代码在 Dreamweaver 中运行良好,但当我将成品上传到我的网站时,只有大约一半的图像显示出来。我已经在 Chrome 和 Internet Explorer 上检查了该站点,并让其他人检查它是否只是我的电脑。
使用此代码将图像加载为背景图像:
.birdzoom {
background-repeat:no-repeat;
background-size:cover;
background-position:center;
}
#bird01 {
background-image: url(../images/thumbs/001.jpg);
}
并显示此代码:
<div class="col-sm-2 imgbox">
<div class="thumb bird birdzoom" id="bird01">
<div class="link" onclick="openModal();currentSlide(1)"></div>
<div class="tags"><a href="purchase.html"><span class="glyphicon glyphicon-tag"></span></a></div>
</div>
<div class="birdname">Name</div>
</div>
前 18 张图片显示正常,我已经四次检查以确保所有图片都使用相同的代码。
在你的样式表中
<link href="css/style.css" rel="stylesheet">
...
#bird01 {
background-image: url(../images/thumbs/001.jpg);
background-repeat:no-repeat;
background-size:cover;
}
#bird02 {
background-image: url(../images/thumbs/002.jpg);
background-repeat:no-repeat;
background-size:cover;
}
...
**you have not set the bird19 to bird58**
#bird19 {
background-image: url(../images/thumbs/019.jpg);
...
**你只设置了图片1到18**