图片在网站中的问题

1.图片在自适应的时候注意:

在大屏轮播的时候把图片的宽度变成100%就行这个图片;

在响应式的网站上的一个1920的图片和 768*448的图片两张图片互相变化

.swiper-wrapper .header-bottem-cen1 img.big {
display: none;
}
.swiper-wrapper .header-bottem-cen1 img.small {
display: block;
width: 100%;
min-height: auto;
object-fit: cover;
}

@media all and (min-width: 768px) {

.swiper-wrapper .header-bottem-cen1 img.big {
display: block;
width: 100%;
height: auto;
object-fit: cover;
}
.swiper-wrapper .header-bottem-cen1 img.small {
display: none;
}

}

@media all and (min-width: 960px) {

   

.swiper-wrapper .header-bottem-cen1 img.big {
display: block;
width: 100%;
height: auto;
object-fit: cover;
}
.swiper-wrapper .header-bottem-cen1 img.small {
display: none;
}

}

猜你喜欢

转载自www.cnblogs.com/jiamaba/p/10608955.html