twitter-bootstrap 如何制作这样的垂直文本滑块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23844044/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 20:47:11  来源:igfitidea点击:

How to make vertical text slider like this

jquerytwitter-bootstrapslider

提问by testerius

I'd like to ask you if you could help me creating a similar text slider like that from http://demo.codepark.co/floyd/

我想问你是否可以帮助我从http://demo.codepark.co/floyd/创建一个类似的文本滑块

I want to create similar slides like these "WE ARE FLOYD" text which change vertically.

我想创建类似的幻灯片,例如垂直变化的“WE ARE FLOYD”文本。

I created something like that [dead link removed] but I don't have any idea what slider scripts use and even how to make it works.

我创建了类似的东西[删除了死链接],但我不知道滑块脚本使用什么,甚至不知道如何使其工作。

回答by Graham Ritchie

http://richhollis.github.io/vticker/

http://richhollis.github.io/vticker/

Here is an example that does exactly what you want to do.

这是一个完全符合您要求的示例。

I would dissect this code to see what it does so you understand the principles of it (dont just blindly use plugins / scripts as learning how they work - even at a fundamental level will help you later.)

我会剖析这段代码,看看它做了什么,这样你就可以理解它的原理(不要盲目地使用插件/脚本来学习它们的工作原理——即使在基本层面上也会对你有所帮助。)

回答by Roman

I bought this theme, and I can tell you, that jquery - flexslider is used.

我买了这个主题,我可以告诉你,使用的是jquery - flexslider。

here a link to jquery flexslider with documentation

这里是带有文档的 jquery flexslider 的链接

http://www.myjqueryplugins.com/jquery-plugin/flexslider#field_methods

http://www.myjqueryplugins.com/jquery-plugin/flexslider#field_methods

use this parameters, and instead of img use eg p od h1 tag.

使用这个参数,而不是 img 使用例如 p od h1 标签。

animation: "slide", directionNav: false, controlNav: false, direction: "vertical", slideshowSpeed: 5000, animationSpeed: 1000, smoothHeight: true

动画:“幻灯片”,方向导航:假,控制导航:假,方向:“垂直”,幻灯片速度:5000,动画速度:1000,平滑高度:真