我一直试图用CSS解决这个问题,但这在技术上是一个JS问题吗?
.carousel-inner .item {
max-width: 100%;
max-height: 100%;
}
.carousel-inner .item img {
width: 100%;
min-height: 100%;
max-height: none;
}
这是我的媒体查询
/* Tablets an medium desktops */
@media (min-width: 992px) and (max-width: 1199px) {
}
/* Tablets portrait and small desktops*/
@media (min-width: 768px) and (max-width: 991px) {
}
/* landscape phones and portrait tablets */
@media (max-width: 767px) {
}
/* landscape phones and small devices */
@media (max-width: 480px) and (height: 300px) {
}