Swiper在网站上太高了

时间:2016-08-09 13:39:27

标签: css css3 swiper

请帮助我,我在我的网站上使用swiper但是刷卡太高了。如果我设置了最大高度,它在响应时无法正常工作 - 测试指示器的链接。 phuccode。 COM

在我设置max-height之前 Picture no max height

设置max-height后 Picture set-maxheight

我的代码

<div class="container slider">
    <div class="swiper-container-2">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
                <a class="img" href="/partner" title="">
                    <img alt ="" src="images/content-1.jpg" class=" img-responsive" title = "">
                </a>
            </div>
            <div class="swiper-slide">
                <a class="img" href="/partner" title="">
                    <img alt ="" src="images/content-1.jpg" class=" img-responsive" title = "">
                </a>
            </div>
        </div>                    
    </div>
    <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>
</div>

这个CSS:之前

.slider .swiper-slide {
margin-right: 16px !important;
width: 15%;
 }
 [class*="swiper-container-"] {
      margin: 0 auto;
      position: relative;
      overflow: hidden;
      z-index: 1;
 }
 .slider a.img img {
      position: absolute;
max-width: 100% !important;
min-width: 10px !important;
min-height: 10px !important;
max-height: auto% !important;
margin: auto;
display: block;
top: 0;
bottom: 0;
left: 0;
right: 0;
border: 1px solid #e8e8e8;
}
.slider{
    width:970px;
    position:relative;
}

这个CSS:之前

.slider .swiper-slide {
margin-right: 16px !important;
width: 15%;
max-height: 180px;
 }
 [class*="swiper-container-"] {
      margin: 0 auto;
      position: relative;
      overflow: hidden;
      z-index: 1;
      max-height: 200px;
 }
 .slider a.img img {
      position: absolute;
max-width: 100% !important;
min-width: 10px !important;
min-height: 10px !important;
max-height: auto% !important;
margin: auto;
display: block;
top: 0;
bottom: 0;
left: 0;
right: 0;
border: 1px solid #e8e8e8;
}
.slider{
    width:970px;
    position:relative;
}

0 个答案:

没有答案