简体   繁体   English

插件:水车图像轮播。 如何只添加文本?

[英]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.

相关问题 Slick 轮播缺少 3 个资源。 我如何实现这些? - Missing 3 recources for the Slick carousel. How do I implement those? jQuery Carousel。 如何仅显示下一个或上一个元素 - jQuery Carousel. How to show the Next or Previous Element only 实现普通的javascript轮播。(无插件) - Implement plain javascript carousel.(Without Plugin) ContentFlow javascript轮播 - 如何向图像添加文本? - ContentFlow javascript carousel - how to add text to image? 我正在使用 Swiper 库创建轮播。 我想将我的卡片元素居中,但我做不到 - I am using Swiper Library to create carousel. i want to center my card element in center but i am not able to do 如何使用引导轮播最大化或填充整个页面。 (带有导航栏) - How to maximize or fill the whole page with bootstrap carousel. (with navigation bar) Twitter Bootstrap Carousel。 如何防止滑动事件结束 - Twitter Bootstrap Carousel. How to prevent slid event from finish 如何在 BootstrapVue 轮播中包含图像? - How do I include image in BootstrapVue carousel? 如何使用CSS制作图像轮播? - How can I make an image carousel with only CSS? SetInterval做轮播。 两个类似的代码段,一个是正确的,另一个是错误的。 为什么? - SetInterval to do carousel. Two similar snippet, one is right, the other is wrong. Why?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM