0
问题是我使用滑动旋转木马,但每当我将该div添加到滑动脚本时,我正在使用内容移动到不同的行中。水平对齐项目滑动旋转木马
这就是我将滚动div添加到Slick脚本后会发生的情况。
我几乎可以肯定这是一个CSS问题,但我已经尝试了很多,无法得到它的工作。这是我的代码...
<div class="testimonios">
<div class="testimonios__container">
<p id="title">Testimonios</p>
<div class="testimonios__container-scroll">
<div class="testimonios__container-photo">
<img id="photo" src="img/photo.png">
<p id="message"><b> Edoardo Perez - Nucliux. </b><br><br>“Humanus logró que mi empresa encontrara los mejores candidatos para satisfacer mis necesidades”. </p>
</div>
<!--<div class="testimonios__container-photo">
<img id="photo" src="img/photo.png">
<p id="message"><b> Alan Vázquez - Nucliux. </b><br><br>"Humanus me encanta" </p>
</div> -->
</div>
</div>
</div>
油滑
<script>
$(document).ready(function(){
$('.testimonios__container-scroll').slick({
autoplay: true,
autoplaySpeed: 2000,
infinite: true,
pauseOnHover: false,
});
});
</script>
这是有关CSS
.testimonios{
height: 23vw;
background: url("../img/testimonios.jpg");
background-repeat: no-repeat;
}
.testimonios__container{
display: flex;
flex-direction: column;
justify-content: center;
width: 80%;
margin-left: 10%;
height: 20vw;
}
.testimonios__container-scroll{
display: flex;
flex-direction: center;
justify-content: center;
width: 70%;
height: auto;
margin-left: 15%;
}
#photo{
margin-right: 3vw;
width: auto;
height: 10vw;
}
.testimonios__container-photo{
display: flex;
flex-direction: row;
justify-content: center;
background-color: ;
width: 100%;
height: 10vw;
margin-left: ;
}
#title{
color: white;
font-weight: bold;
font-size: 1.5vw;
text-transform: uppercase;
margin-bottom: 2.2vw;
text-align: center;
margin-top: 1.5vw;
}
#message{
color: white;
font-size: 1.2vw;
margin-top: 1vw;
margin-bottom: 1vw;
}
有一个现场演示here滚动到底
它留在位置肯定的,但取消注释什么是第二个元素,它打破了,不知道为什么它也不动画。 – Alan
这是同样的问题,这里是摆弄多张幻灯片:https://jsfiddle.net/woptima/Lj5pwdhp/2/ – buxbeatz
哦,是的!谢谢!我现在可以看到它的作品。任何想法为什么在最后一个元素的风格消失了几秒钟,然后回到原来的? – Alan