你需要让你的.carousel
类作为100%
的宽度..
你需要做下面的改变你的CSS,
.carousel{
width: 100%;
margin: auto;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
width: 100%;
margin: auto;
}
但是如果你想要让他们在480x320px最初和想要在浏览器调整大小时处理它们,那么您需要进行媒体查询。
/* For devices which are smaller than 960 pixels */
@media only screen and (max-width: 959px) {
//Write your CSS here.
}
/* For Tablets */
@media only screen and (min-width: 768px) and (max-width: 959px) {
//Write your CSS here.
}
/* For all mobiles */
@media only screen and (max-width: 767px) {
//Write your CSS here.
}
/* Mobile Landscape Size to Tablet Portrait */
@media only screen and (min-width: 480px) and (max-width: 767px) {
//Write your CSS here.
}
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {
//Write your CSS here.
}
希望这有助于!
我想在完整的浏览器屏幕上显示480x320px的轮播/图片,但是当您开始调整大小时,浏览器轮播/图片也会缩小。 –
然后,您需要选择编写媒体查询。检查我上面的更新的答案。 –