[英]Plugin: Waterwheel Image Carousel. How do I add only text?
In the project I use Waterwheel Image Carousel plugin.在项目中我使用了 Waterwheel Image Carousel 插件。 This plugin does not work when adding text.
添加文本时,此插件不起作用。 How can I make the effect to be the same as with an image, but only instead of pictures will be the text?
我怎样才能使效果与图像相同,但只有文字而不是图片?
Example below:下面的例子:
enter image description here在此处输入图像描述
If there are any other plugins that allow you to make the same carousel as in the picture?如果有任何其他插件可以让您制作与图片中相同的轮播?
You can use slick instead, which supports any HTML elements您可以改用 slick,它支持任何 HTML 元素
https://kenwheeler.github.io/slick/ https://kenwheeler.github.io/slick/
Here's an example using text and a few images: https://codepen.io/JonathanSouthern/pen/xxZMQOz这是一个使用文本和一些图像的示例: https://codepen.io/JonathanSouthern/pen/xxZMQOz
HTML HTML
<div class="carousel">
<div><img src="localimg"></div>
<div><img src="testing_img_souce"></div>
<div><h2>Text</h2></div>
</div>
JS/JQuery JS/jQuery
$(document).ready(function(){
$('.carousel').slick({
slidesToShow: 3,
dots:true,
centerMode: true,
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.