gpt4 book ai didi

javascript - 如何重新定位光滑的点?

转载 作者:太空宇宙 更新时间:2023-11-03 22:57:02 25 4
gpt4 key购买 nike

我正在使用 slick 创建一个旋转木马,目前这些点表示要显示的图像位于图像下方。我希望它显示在图像内部,就像覆盖图像一样。

这是我的代码

<div class="carousel">
<div><img src="path1"></div>
<div><img src="path2"></div>
<div><img src="path3"></div>
</div>

这是我的CSS

.slick-dots{
position: absolute;
bottom: -25px;

display: block;

width: 100%;
padding: 0;
margin: 0;

list-style: none;

text-align: center;
}

这是我的代码

<script type="text/javascript">
$(document).ready(function(){
$('.carousel').slick({
dots: true,
infinite: true,
speed: 500,
fade: true,
cssEase: 'ease',
autoplay: true,
arrows: false,
lazyLoad: 'ondemand',
cssEase: 'linear',
});
});
</script>

这是 link我用来做旋转木马。

最佳答案

CSS:

.slider {
width: 650px;
margin: 0 auto;
}
.slick-dots{
position: absolute;
bottom: 20px;
display: block;
width: 100%;
padding: 10;
margin: 0;
list-style: none;
text-align: center;
}
.slick-dots li.slick-active button:before{
font-size:15px;
color:blue;
}

js:

$('.carousel').slick({
slidesToShow: 3,
slidesToScroll: 3,
dots: true,
infinite: true,
cssEase: 'linear'
});

看这个例子: https://jsfiddle.net/5ox31m2a/89/

关于javascript - 如何重新定位光滑的点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38045776/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com