本章将为您提供有关如何安装滑块和设置选项的一般说明。如有需要,后续章节将更详细地介绍。
我需要将哪些文件上传到我的服务器?
请上传 rs-plugin 文件夹到您的服务器。在此文件夹中,您将找到包含所有项目内容的以下子文件夹:
您可以使用自己的 jQuery,但我们建议直接从 Google 资源加载它(请参阅本文档后面的内容)。
您会在下载的 zip 文件中找到许多 examples 在 examples&sources 文件夹下。
实现 jQuery
将以下行添加到您的 HTML Head:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js></script>
将 Revolution js 和 css 文件添加到您的 HTML 页面
同样在 <HEAD> 部分:
<!-- jQuery REVOLUTION Slider -->
<script type="text/javascript" src="rs-plugin/js/jquery.themepunch.tools.min.js"></script>
<script type="text/javascript" src="rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
<!-- REVOLUTION BANNER CSS SETTINGS -->
<link rel="stylesheet" type="text/css" href="rs-plugin/css/settings.css" media="screen" />
这包含滑块本身以及一些辅助模块的 JS 和 CSS。
为横幅创建容器
将其放入 HTML:(此处使用的类名仅为示例。在我们提供的示例文件中,我们称它们为 banner-container、fullwidthbanner-container 和 fullscreenbanner-container,与下面的不同!)
<div class="bannercontainer">
<div class="banner">...</div>
</div>
根据您希望使用的布局,Banner-container 可以具有不同的样式。
自动响应式样式
此样式允许您让包装容器决定您的滑块将有多大(宽度)。高度将根据滑块宽度自动计算。
将其放入您的 CSS 文件(例如):
.bannercontainer {
width:100%;
position:relative;
padding:0;
}
.banner{
width:100%;
position:relative;
}
全屏样式
此样式允许您让横幅始终适应最大屏幕尺寸。在某些选项中,您可以选择会减小横幅高度的容器。请参阅示例。
它需要:
将其放入您的 CSS 文件
.bannercontainer {
width:100%;
position:relative;
padding:0;
}
创建您的第一个幻灯片
在横幅容器内创建一个无序列表,其中每个 <li> 元素将对应一个幻灯片。
<ul>
<!-- THE BOXSLIDE EFFECT EXAMPLES WITH LINK ON THE MAIN SLIDE EXAMPLE -->
<li data-transition="boxslide" data-slotamount="7" data-link="http://www.google.de">
<img src="images/slides/image1.jpg">
<div class="caption sft big_white" data-x="400" data-y="100" data-speed="700" data-start="1700" data-easing="easeOutBack">KICKSTART YOUR WEBSITE</div>
<div class="caption sfb big_orange" data-x="400" data-y="142" data-speed="500" data-start="1900" data-easing="easeOutBack">WITH SLIDER REVOLUTION!</div>
<div class="caption lfr medium_grey" data-x="510" data-y="210" data-speed="300" data-start="2000">UNLIMITED TRANSITIONS</div>
</li>
...
</ul>
调用 jQuery 插件来构建滑块
(无需设置所有选项。这些仅用于演示所有设置)
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.banner').revolution({
delay:9000,
startwidth:960,
startheight:500,
startWithSlide:0,
fullScreenAlignForce:"off",
autoHeight:"off",
minHeight:"off",
shuffle:"off",
onHoverStop:"on",
thumbWidth:100,
thumbHeight:50,
thumbAmount:3,
hideThumbsOnMobile:"off",
hideNavDelayOnMobile:1500,
hideBulletsOnMobile:"off",
hideArrowsOnMobile:"off",
hideThumbsUnderResoluition:0,
hideThumbs:0,
hideTimerBar:"off",
keyboardNavigation:"on",
navigationType:"bullet",
navigationArrows:"solo",
navigationStyle:"round",
navigationHAlign:"center",
navigationVAlign:"bottom",
navigationHOffset:30,
navigationVOffset:30,
soloArrowLeftHalign:"left",
soloArrowLeftValign:"center",
soloArrowLeftHOffset:20,
soloArrowLeftVOffset:0,
soloArrowRightHalign:"right",
soloArrowRightValign:"center",
soloArrowRightHOffset:20,
soloArrowRightVOffset:0,
touchenabled:"on",
swipe_velocity:"0.7",
swipe_max_touches:"1",
swipe_min_touches:"1",
drag_block_vertical:"false",
parallax:"mouse",
parallaxBgFreeze:"on",
parallaxLevels:[10,7,4,3,2,5,4,3,2,1],
parallaxDisableOnMobile:"off",
stopAtSlide:-1,
stopAfterLoops:-1,
hideCaptionAtLimit:0,
hideAllCaptionAtLilmit:0,
hideSliderAtLimit:0,
dottedOverlay:"none",
spinned:"spinner4",
fullWidth:"off",
forceFullWidth:"off"
fullScreen:"off",
fullScreenOffsetContainer:"#topheader-to-offset",
fullScreenOffset:"0px",
panZoomDisableOnMobile:"off",
simplifyAll:"off",
shadow:0
});
});
</script>
初始化插件的选项(主题排序):
全局设置:
- delay
一个幻灯片在屏幕上停留的时间(毫秒)。全局设置。您可以通过 <li> 元素中的 data-delay 为每个幻灯片设置额外的本地延迟时间(默认值:9000)
- startheight
字幕显示的网格高度(像素)。此高度是全宽布局和响应式布局中滑块的最大高度。在全屏布局中,如果滑块高于此值,网格将垂直居中。
- startwidth
字幕显示的网格高度(像素)。此宽度是响应式布局中滑块的最大宽度。在全屏和全宽布局中,如果滑块宽度大于此值,网格将水平居中。
导航设置:
- keyboardNavigation
可能的值:“on”、“off” - 允许在滑块获得焦点时使用键盘导航的左右箭头。
- onHoverStop
可能的值:“on”、“off” - 鼠标悬停在滑块上时停止计时器。字幕动画不会停止!!它们只会播放到结束。
- thumbWidth / thumbHeight
缩略图的宽度和高度(像素)。缩略图默认不响应。对于响应式缩略图,您需要创建基于媒体查询的缩略图尺寸。
- thumbAmount
同时可见的缩略图数量。其余的缩略图仅在悬停时或更改幻灯片时可见。
- hideThumbs
0 - 永不隐藏缩略图。 1000-100000(毫秒)在预设毫秒数后隐藏缩略图和导航箭头、项目符号(1000毫秒==1秒,1500==1.5秒等)。
- navigationType “项目符号/缩略图”栏的显示类型(默认:“none”)
可能的值为:“bullet”、“thumb”、“none”
- navigationArrows 导航箭头的显示位置(默认:“nexttobullets”)
可能的值为“nexttobullets”、“solo”
nexttobullets - 箭头添加到项目符号的左右两侧
solo - 箭头可以独立定位,请参阅更多选项
- navigationStyle 导航项目符号的外观(当 navigationType 为“bullet”时选择)。
可能的值:“preview1”、“preview2”、“preview3”、“preview4”、“round”、“square”、“round-old”、“square-old”、“navbar-old”
- navigationHAlign, navigationVAlign
导航项目符号/缩略图的垂直和水平对齐(取决于选择的样式)。 可能的值 navigationHAlign:“left”、“center”、“right” 和 naigationVAlign:“top”、“center”、“bottom”
- navigationHOffset navigationVOffset
导航的偏移位置,取决于对齐位置。从 -1000 到 +1000 的任何值(像素)。 例如 -30
- soloArrowLeftHaling, soloArrowRightHalign, solorArrowLeftHalign, soloArrowRightHalign
导航箭头(左和右独立!)的垂直和水平对齐。可能的值 navigationHAlign:“left”、“center”、“right” 和 naigationVAlign:“top”、“center”、“bottom”
- soloArrowLeftHOffset, soloArrowLeftVOffset, soloArrowRightHVOffset, soloArrowRightVOffset
导航的偏移位置,取决于对齐位置。从 -1000 到 +1000 的任何值(像素)。 例如 -30 每个箭头独立
- touchenabled 在触摸设备上启用滑动功能(默认:“on”)
可能的值:“on”、“off”
- swipe_velocity 滑动手势的灵敏度(值越低越灵敏)(默认值:0.7)
可能的值:0 - 1
- swipe_max_touches 触摸的最大手指数量(默认值:1)
可能的值:1 - 5
- swipe_min_touches 触摸的最小手指数量(默认值:1)
可能的值:1 - 5
- drag_block_vertical 拖动时阻止垂直滚动(默认值:false)
可能的值:true, false
循环
- startWithSlide
从预定义幻灯片开始(幻灯片索引) - stopAtSlide
到达幻灯片“x”时停止计时器。如果 stopAfterLoops 设置为 0,则在第一个循环中已在定义的幻灯片 X 处停止。-1 表示不在任何幻灯片处停止。在这种情况下,stopAfterLoops 没有意义。
- stopAfterLoops
所有幻灯片播放“x”次后停止计时器。如果设置为 -1,则幻灯片永远不会自动停止,它将在 stopAtSlide:x 定义的幻灯片处停止。
移动设备可见性
- hideCaptionAtLimit
它定义了在屏幕分辨率下是否显示字幕(基于浏览器宽度)。
- hideAllCaptionAtLimit
如果浏览器宽度小于此值,则隐藏所有字幕
- hideSliderAtLimit
如果浏览器宽度小于此值,则隐藏整个滑块,并停止功能
- hideNavDelayOnMobile
在移动设备上隐藏所有导航(基于触摸和释放事件)
- hideThumbsOnMobile
可能的值:“on”、“off” - 如果设置为“on”,则在移动设备上不显示缩略图
- hideBulletsOnMobile
可能的值:“on”、“off” - 如果设置为“on”,则在移动设备上不显示项目符号
- hideArrowsOnMobile
可能的值:“on”、“off” - 如果设置为“on”,则在移动设备上不显示箭头
- hideThumbsUnderResoluition
可能的值:0 - 1900 - 定义在哪个分辨率下应隐藏缩略图。(仅当 hideThumbonMobile 设置为 off 时)
布局样式
- spinner
可能的值:“spinner1”、“spinner2”、“spinner3”、“spinner4”、“spinner5” - 加载器的布局。如果未定义,它将使用基本加载器。
-
- hideTimerBar
可能的值:“on”、“off” - 它将隐藏或显示横幅计时器
- fullWidth
可能的值:“on”、“off” - 定义是否激活全宽/自动响应模式
- autoHeight
可能的值:“on”、“off” - 定义在全宽模式下,滑块的高度是否始终可以按比例增长。如果设置为“off”,则最大高度等于 startheight
- minHeight
可能的值:0 - 9999 - 定义滑块的最小高度。滑块容器的高度将永远不会小于此值。内容容器仍然线性收缩到浏览器宽度和容器的原始宽度,并将垂直居中在滑块中。
- fullScreenAlignForce
可能的值:“on”、“off” - 仅在全屏模式下允许。它允许字幕网格全屏,意味着所有位置都应通过对齐和偏移来完成。这允许您使用滑块的最远角落来呈现任何字幕。
- forceFullWidth
可能的值:“on”、“off” - 即使滑块嵌入在盒式容器中,也强制全宽尺寸。它可能会提高 CPU 的性能使用。首先尝试将其设置为“off”,并使用全宽容器而不是此选项。
- fullScreen
可能的值:“on”、“off” - 定义是否激活全屏模式
- fullScreenOffsetContainer
该值是容器 ID 或类,例如“#topheader” - 全屏高度将随此容器高度增加!
- fullScreenOffset
一个 px 或 % 值,将添加到/从全高容器计算中减去。
- shadow
可能的值:0,1,2,3 (0 == 无阴影,1,2,3 - 不同阴影类型)
- dottedOverlay
可能的值:“none”、“twoxtwo”、“threexthree”、“twoxtwowhite”、“threexthreewhite” - 为背景图像创建额外的圆点叠加。最适合全屏/全宽滑块,其中图像像素化过于严重。
视差设置
- parallax
可能的值:“mouse”、“scroll” - 视差应如何运作。在鼠标悬停和移动设备倾斜时,或在滚动时(在移动设备上禁用滚动!)
- parallaxBgFreeze
可能的值:“on”、“off” - 如果关闭,主幻灯片图像也会随视差级别 1 一起滚动。
- parallaxLevels
一个定义视差深度的数组(0 - 10)。根据值,它将定义鼠标移动或滚动时视差偏移的强度。在图层中,您可以使用类如 rs-parallaxlevel-1 来表示不同的级别。如果一个 tp-caption 图层具有 rs-parallaxlevel-X(X 为 1-10),则它会激活该图层的视差移动。 可用值:“none”、“twoxtwo”、“threexthree”、“twoxtwowhite”、“threexthreewhite” - 为背景图像创建额外的圆点叠加。最适合全屏/全宽滑块,其中图像像素化过于严重。
- parallaxDisableOnMobile
可能的值:“on”、“off” - 在移动设备上开启/关闭视差效果
平移缩放设置
- panZoomDisableOnMobile
可能的值:“on”、“off” - 在移动设备上开启/关闭平移缩放效果
更多选项
- simplifyAll
可能的值:“on”、“off” - 在旧版浏览器(如 IE8 和 iOS4 Safari)上将所有动画设置为淡入,而不拆分字母以节省性能
幻灯片选项
<li> - 每个列表项代表一个新幻灯片。要定义过渡、主链接等,请使用以下 data- 每个列表项的值。
过渡效果
- data-transition
此幻灯片的出现过渡。您可以定义多个,因此在每次循环中将显示下一个幻灯片过渡类型。
Flat Transitions:
向上滑动 - slideup
向下滑动 - slidedown
向右滑动 - slideright
向左滑动 - slideleft
水平滑动(取决于下一个/上一个) - slidehorizontal
垂直滑动(取决于下一个/上一个) - slidevertical
盒子滑动 - boxslide
水平滑块 - slotslide-horizontal
垂直滑块 - slotslide-vertical
淡入盒子 - boxfade
水平淡入 - slotfade-horizontal
垂直淡入 - slotfade-vertical
从右侧淡入和滑动 - fadefromright
从左侧淡入和滑动 - fadefromleft
从顶部淡入和滑动 - fadefromtop
从底部淡入和滑动 - fadefrombottom
淡入左侧并从右侧淡出 - fadetoleftfadefromright
淡入右侧并从左侧淡出 - fadetorightfadefromleft
淡入顶部并从底部淡出 - fadetotopfadefrombottom
淡入底部并从顶部淡出 - fadetobottomfadefromtop
向右视差 - parallaxtoright
向左视差 - parallaxtoleft
向上视差 - parallaxtotop
Parallax to Bottom - parallaxtobottom
Zoom Out and Fade From Right - scaledownfromright
Zoom Out and Fade From Left - scaledownfromleft
Zoom Out and Fade From Top - scaledownfromtop
Zoom Out and Fade From Bottom - scaledownfrombottom
ZoomOut - zoomout
ZoomIn - zoomin
Zoom Slots Horizontal - slotzoom-horizontal
Zoom Slots Vertical - slotzoom-vertical
Fade - fade
Random Flat - random-static
Random Flat and Premium - random
Premium Transitions:
Curtain from Left - curtain-1
Curtain from Right - curtain-2
Curtain from Middle - curtain-3
3D Curtain Horizontal - 3dcurtain-horizontal
3D Curtain Vertical - 3dcurtain-vertical
Cube Vertical - cube
Cube Horizontal - cube-horizontal
In Cube Vertical - incube
In Cube Horizontal - incube-horizontal
TurnOff Horizontal - turnoff
TurnOff Vertical - turnoff-vertical
Paper Cut - papercut
Fly In - flyin
Random Premium - random-premium
想了解更多提供全方位的互联网品牌行销解决方案相关内容,尽在欧博。
-
data-randomtransition
"on" / "off" - This will allow a Random transitions of the Selected Transitions you choosed in the data-transitions. Dont use together with random premium and random flat transitions !
-
data-slotamount
The number of slots or boxes the slide is divided into. If you use boxfade, over 7 slots can be juggy.
-
data-masterspeed
The speed of the transition in "ms". default value is 300 (0.3 sec)
- data-delay
A new Dealy value for the Slide. If no delay defined per slide, the dealy defined via Options will be used
Links (Full Slide Links)
- data-link
A link on the whole slide pic
- data-target
The target of the Link for the whole slide pic. (i.e. "_blank", "_self")
- data-slideindex
Possible values: next,back, 1-x (where x is the max. Amount of slide) If this value is set, click on slide will call the next / previous, or n th Slide.
Thumbnail
- data-thumb
An Alternative Source for thumbs. If not defined a copy of the background image will be used in resized form
Title
- data-title
In Navigation Style Preview1- preview4 mode you can show the Title of the Slides also. Due this option you can define for each slide its own Title
The Main Image
Each Slide (<li> </li>) MUST include a main image which is added as a simple <img> tag at the first level. It can be a Simpe image, a colored or transparent image, or dummy image as lazy load version.
Simple Image
<img src="images/slides/slide13.jpg" >
Colored Background Instead of Image
<img src="images/slides/transparent.png" style="background-color:#56e34a" >
Lazy Loaded Image
<img src="images/slides/dummy.webp" data-lazyload="images/slides/slide13.jpg">
Tiled Image
<img src="images/slides/slide13.jpg" data-bgrepeat="repeat" data-bgfit="normal" data-bgposition="center center">
Fitting Image
<img src="images/slides/slide13.jpg" data-bgrepeat="no-repeat" data-bgfit="contain" data-bgposition="center center">
Covering Image
<img src="images/slides/slide13.jpg" data-bgrepeat="no-repeat" data-bgfit="cover" data-bgposition="center center">
Bottom Right Aligned Covering Image
<img src="images/slides/slide13.jpg" data-bgrepeat="no-repeat" data-bgfit="cover" data-bgposition="right bottom">
Ken Burns Animation on Image
<img src="images/kenburns1.jpg" alt="kenburns1" data-bgposition="left bottom" data-kenburns="on" data-duration="2000" data-ease="Power4.easeInOut" data-bgfit="200" data-bgfitend="100" data-bgpositionend="center top">
Image Attributes
- Lazy Loading
src="images/slides/dummy.webp" (or any other dummy small image to decrease the loading time of Document) data-lazyload="path/filename" Here you need to declare the Path and File name of the image you wish to laod as Main Image in Slide
- Background Repeat
data-bgrepeat:no-repeat / repeat / repeat-x / repeat-y (the way the image is shown in the slide main container)
- Background Fit
data-bgfit:cover / contain / normal / width(%) height(%) (select one to decide how the image should fit in the Slide Main Container).
For Ken Burn use only a Number, which is the % Zoom at start. 100 will fit with Width or height automatically, 200 will be double sized etc..
- Background Fit End
data-bgfitend: Use only a Number . i.e. 300 will be a 300% Zoomed image where the basic 100% is fitting with width or height.
- Background Position
data-bgposition:left top / left center / left bottom / center top / center center / center bottom / right top / right center / right bottom
- Background Position End
data-bgpositionend:left top / left center / left bottom / center top / center center / center bottom / right top / right center / right bottom For Ken Burns Animation. This is where the IMG will be animatied
- Ken Burns Effect
data-kenburns:on/off to turn on Ken Burns Effect or keep it disabled.
- Duration for Ken Burns
data-duration:the value in ms how long the animation of ken burns effect should go. i.e. 3000 will make a 3s zoom and movement.
- Easing of Ken Burns Effect
data-ease:Same values as by Caption Easings available. The Movement Easing.
The Captions / Layers
Each <li> (slide) can include unlimited amount of Captions. Caption are simple html markups with iframe, image, heading , paragraph and any other tags. Each Caption must be wrapped via a <div class="caption"></div>.
Each Caption has some special classes and some data- attributes, to set animation type, position, speed, easings etc.
Caption Classes
- the "caption" class
It is the Wrapping main Class which is a MUST. Each Caption need to be defined like this, other way the Slider Plugin can not identifikate the Caption container
- Styling Captions (like "big_white", "big_orange", "medium_grey" etc...)
These are Styling classes created in the settings.css You can add unlimited amount of Styles in your own css file, to style your captions at the top level already
- 视差设置 (like "rs-parallaxlevel-1", "rs-parallaxlevel-2", "rs-parallaxlevel-3" etc...)
You can define a Parallax Level for each Layer, which will allow the Layer to move based on scroll or mouse movements (if option activated). Based on the Class the Strength of the offset can be defined.
- Animation Classes
Animation Classes defined the start / end animations on Captions.
Incoming animation Classes:
sft - Short from Top
sfb - Short from Bottom
sfr - Short from Right
sfl - Short from Left
lft - Long from Top
lfb - Long from Bottom
lfr - Long from Right
lfl - Long from Left
skewfromleft - Skew from Left
skewfromright - Skew from Right
skewfromleftshort - Skew Short from Left
skewfromrightshort - Skew Short from Right
fade - fading
randomrotate- Fade in, Rotate from a Random position and Degree
customin - Custom Incoming Animation - see below all data settings
Outgoing animation Classes:
stt - Short to Top
stb - Short to Bottom
str - Short to Right
stl - Short to Left
ltt - Long to Top
ltb - Long to Bottom
ltr - Long to Right
ltl - Long to Left
skewtoleft - Skew to Left
skewtoright - Skew to Right
skewtoleftshort - Skew Short to Left
skewtorightshort - Skew Short to Right
fadeout - fading
randomrotateout欧博围绕实时追踪电竞赛事数据,助力品牌发声不断创新,回应用户的真实需求。
customout - Custom Outgoing Animation - see below all data settings
Custom Incoming / OutGoing settings:
data-customin="rotationX:0;rotationY:0;rotationZ:0...." - How the Caption is Transformed before animation starts. All value will be animated to 0 or 1 to remove all transoformation of the Caption.
data-customout="rotationX:0;rotationY:0;rotationZ:0...."- The End Transformed Style after the animation finnished. All value will be animated from 0 or 1 to the selected transformation.
Custom Animation (in and out) Parameters set via data-customin and data-customout within the caption div. Parameter should be closed with ";"
rotationX:0;rotationY:0;rotationZ:0 - value between -920 and +920. Rotation Direction set via X,Y,Z, Can be mixed
scaleX:1;scaleY:1 - value between 0.00 - 10.00 Scale width and height. 1 == 100%
skewX:1;skewY:1 - value between 0.00 - 10.00 Skew inVertical and/or horizontal direction 0 = no skew
opacity:1 - value between 0.00 - 1.00 Transparencity
transformOrigin:center center - Sets the origin around which all transforms occur. By default, it is in the center of the element ("50% 50%"). You can define the values using the keywords "top", "left", "right", or "bottom" or you can use percentages (bottom right corner would be "100% 100%") or pixels.
Values:left top / left center / left bottom / center top / center center / center bottom / right top / right center / right bottom or x% y%
transformPerspective:300 - To get your elements to have a true 3D visual perspective applied, you must either set the “perspective” property of the parent element or set the special “transformPerspective” of the element itself (common values range from around 200 to 1000, the lower the number the stronger the perspective distortion).
x:0;y:0; - the x / y distance of the element in px. i.e. x:-50px means vertical left 50px
Caption data- settings
- data-x
Possible Values are "left", "center", "right", or any Value between -2500 and 2500.
If left/center/right is set, the caption will be siple aligned to the position. Any other "number" will simple set the left position in px of tha caption.
At "left" the left side of the caption is aligned to the left side of the slider.
At "center" the center of caption is aligned to the center of slide.
At "right" the caption right side is aligned to the right side of the Slider.
- data-y
Possible Values are "top", "center", "bottom", or any Value between -2500 and 2500.
If top/center/bottom is set, the caption will be siple aligned to the position. Any other "number" will simple set the top position in px of tha caption.
At "top" the top side of the caption is aligned to the top side of the slider.
精选打造顶级品牌网站,提升用户体验内容,欧博与你一同发现更多精彩。
At "bottom" the caption bottom side is aligned to the bottom side of the Slider.
- data-hoffset
Only works if data-x set to left/center/right. It will move the Caption with the defined "px" from the aligned position. i.e. data-x="center" data-hoffset="-100" will put the caption 100px left from the slide center horizontaly.
- data-voffset
Only works if data-y set to top/center/bottom. It will move the Caption with the defined "px" from the aligned position. i.e. data-x="center" data-hoffset="-100" will put the caption 100px left from the slide center vertically.
- data-speed
The speed in milliseconds of the transition to move the Caption in the Slide at the defined timepoint.
- data-splitin
Split Text Animation (incoming transition) to "words", "chars" or "lines". This will create amazing Animation Effects on one go, without the needs to create more captions.
- data-elementdelay
A Value between 0 and 1 like 0.1 to make delays between the Splitted Text Element (start) Animations. Higher the amount of words or chars, you should decrease that number!
- data-splitout
Split Text Animation (outgoing transition) to "words", "chars" or "lines". Only available if data-end is set !
- data-endelementdelay
A Value between 0 and 1 like 0.1 to make delays between the Splitted Text Element (end) Animations. Higher the amount of words or chars, you should decrease that number!
- data-start
The timepoint in millisecond when/at the Caption should move in to the slide.
- data-easing
The Easing Art how the caption is moved in to the slide (note! Animation art set via Classes !).
Possible Values are:
New Easings:Linear.easeNone Power0.easeIn (linear), Power0.easeInOut (linear), Power0.easeOut (linear), Power1.easeIn, Power1.easeInOut, Power1.easeOut, Power2.easeIn, Power2.easeInOut, Power2.easeOut, Power3.easeIn, Power3.easeInOut, Power3.easeOut, Power4.easeIn, Power4.easeInOut, Power4.easeOut, Quad.easeIn (same as Power1.easeIn), Quad.easeInOut (same as Power1.easeInOut), Quad.easeOut (same as Power1.easeOut), Cubic.easeIn (same as Power2.easeIn), Cubic.easeInOut (same as Power2.easeInOut), Cubic.easeOut (same as Power2.easeOut), Quart.easeIn (same as Power3.easeIn), Quart.easeInOut (same as Power3.easeInOut), Quart.easeOut (same as Power3.easeOut), Quint.easeIn (same as Power4.easeIn), Quint.easeInOut (same as Power4.easeInOut), Quint.easeOut (same as Power4.easeOut), Strong.easeIn (same as Power4.easeIn), Strong.easeInOut (same as Power4.easeInOut), Strong.easeOut (same as Power4.easeOut), Back.easeIn, Back.easeInOut, Back.easeOut, Bounce.easeIn, Bounce.easeInOut, Bounce.easeOut, Circ.easeIn, Circ.easeInOut, Circ.easeOut, Elastic.easeIn, Elastic.easeInOut, Elastic.easeOut, Expo.easeIn, Expo.easeInOut, Expo.easeOut, Sine.easeIn, Sine.easeInOut, Sine.easeOut, SlowMo.ease
Old Easings: easeOutBack, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic
easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint
easeOutQuint, easeInOutQuint, easeInSine, easeOutSine, easeInOutSine
easeInExpo, easeOutExpo, easeInOutExpo, easeInCirc, easeOutCirc, easeInOutCirc
easeInElastic, easeOutElastic, easeInOutElastic, easeInBack, easeOutBack, easeInOutBack
easeInBounce, easeOutBounce, easeInOutBounce
- data-endspeed
The speed in milliseconds of the transition to move the Caption out from the Slide at the defined timepoint.
- data-end
The timepoint in millisecond when/at the Caption should move out from the slide.
- data-endeasing
The Easing Art how the caption is moved out from the slide (note! 欧博专注欧博官网,为用户提供专业可靠的体验。
Possible Values are:
New Easings:围绕深度挖掘并包装品牌核心价值,欧博持续打磨更优质的服务。
Old Easings: 欧博深耕提供全方位的互联网品牌行销解决方案领域,用心服务每一位用户。
在实时追踪电竞赛事数据,助力品牌发声方面,欧博提供贴心周到的支持。
欧博以打造顶级品牌网站,提升用户体验为核心,带来高效便捷的体验。
想了解更多欧博官网相关内容,尽在欧博。
欧博围绕深度挖掘并包装品牌核心价值不断创新,回应用户的真实需求。
欧博围绕深度挖掘并包装品牌核心价值不断创新,回应用户的真实需求。
Special Classes within the Caption container
- tp-scrollbelowslider
If this class added to an element within the caption container, it will scroll the Body Position to under the current slider (used in Fullscreen slider only)
- scrolloffset
value from -200 till 200. The Offset Value of the Scroll Position
- tp-resizeme
Add class tp-resizeme to the container inside the caption and every item within (included the same container) will be responsive resized. Only needed if more than one depth exist in the container !
- frontcorner, backcorner, frontcornertop, backcornertop
This classes added without any content in a closed div i.e. <div class="frontcorner"></div> within the container. It will cut the left/right side of the caption background in 45° 1:1
Loop Animations Within the Layers
To Define Loop animations, everything which comes inside the Layer need to be wrapped with a div container where you can set the different Loop Animation Details
- rs-wave
<div class="rs-wave" data-speed="2" data-angle="0" data-radius="20" data-origin="50% 50%">
<img src="images/dummy.webp" alt="" data-lazyload="images/newwave1.png">
</div>
- rs-pulse
<div class="rs-pulse" data-easing="Power4.easeInOut" data-speed="2" data-zoomstart="1" data-zoomend="0.95">
<img src="images/dummy.webp" alt="" data-lazyload="images/cloud1.png">
</div>
- rs-pendulum
<div class=" rs-pendulum" data-easing="Power1.easeInOut" data-startdeg="-6" data-enddeg="6" data-speed="2" data-origin="50% 75%">
<img src="images/dummy.webp" alt="" data-lazyload="images/cloud1.png">
</div>
- rs-slideloop
<div class=" rs-slideloop" data-easing="Power3.easeInOut" data-speed="0.5" data-xs="-5" data-xe="5" data-ys="0" data-ye="0">
<img src="images/dummy.webp" alt="" data-lazyload="images/cloud1.png">
</div>
- rs-rotate
<div class=" rs-rotate" data-easing="Power1.easeInOut" data-startdeg="-6" data-enddeg="6" data-speed="2" data-origin="50% 75%">
<img src="images/dummy.webp" alt="" data-lazyload="images/cloud1.png">
</div>
The slider can play Vimeo, YouTube and HTML5 (videoJs) Videos, in boxed and "FullSlide" size. Via the Embeded API's the Slider will be paused, and restarted from the VideoPlayers. To use the Video Files in Slider see the following instructions.
Each Video file has the same data- options like:
- autoplay
Possible Values: "true" / "false" - will play the Video Directly when slider has been loaded
- autoplayonlyfirsttime
Possible Values: "true" / "false" after first Autplay the video will not be played automatically - nextslideatend
Possible Values: "true" / "false" after video come to the end position, it swaps to the next slide automatically.
- videoposter
the full path to an image which will be shown as Thumbnail for the Video. (only if autoplay set to false, or autoplayonlyfirsttime set to true)
- forcecover
used only at HTML5 Videos. In case it is selected, the Videos will be resized to cover the full Slider size.
- forcerewind
Every time the Slide is shown, the Video will rewind to the start.
- volume
If value set to "mute", video will be played muted.
- videowidth
Width of Video (i.e. 500 for 500px, or 100% for 100%
- videoheight
精选提供全方位的互联网品牌行销解决方案内容,欧博与你一同发现更多精彩。
- aspectratio
"16:9" or "4:3"
- videopreload
Which content of Video should be preloaded. "none", "meta", "auto"
- videomp4
The MP4 Source for the HTML5 Video
- videowebm
The WEBM Source for the HTML5 Video
- videoogv
The OGV Source for the HTML5 Video
- ytid
The YouTube ID of the Video
- vimeoid
The Vimeo ID of the Video
- videocontrols
Show/Hide the controls of the Video. "none", "controls"
- videoattributes
Further Video Attributes for not listed Options and Settings of Video. Used for YouTube and Vimeo like "enablejsapi=1&html5=1&hd=1&wmode=opaque&showinfo=0&rel=0"
- videoloop
Loop HTML5 Videos - "none", "loop", "loopandnoslidestop" loop and no slide stop will loop the video, but as soon the video Timer reached the endpoint, next slide will be started.
YouTube Video via iFrame
Boxed version
YouTube Video will be added within a caption due an iframe. The Following example shows an iFrame embeded YouTube Video in a caption (460px X 259px), i.e.:
<div class="caption fade "
data-autoplay="true"
data-autoplayonlyfirsttime="true"
data-thumbimage="yourpath/yourimage"
data-nextslideatend="false"
data-x="130"
data-y="70"
data-speed="500"
data-start="10"
data-easing="easeOutBack">
<iframe src="http://www.youtube.com/embed/T8--OggjJKQ?enablejsapi=1&html5=1&hd=1&wmode=opaque&controls=1&showinfo=0;rel=0;" width="460" height="259"></iframe>
</div>
You may need to use the origina=http://yourdomain or origin=https://yourdomain for YT Api issues !
FullWidth Version (/i.e.)
<div class="caption fade fullscreenvideo"
data-autoplay="true"
data-autoplayonlyfirsttime="true"
data-thumbimage="yourpath/yourimage"
data-nextslideatend="true"
data-x="0"
data-y="0"
data-speed="500"
data-start="10"
data-easing="easeOutBack">
<iframe src="http://www.youtube.com/embed/T8--OggjJKQ?enablejsapi=1&html5=1&hd=1&wmode=opaque&controls=1&showinfo=0;rel=0;" width="100%" height="100%"></iframe>
</div> You may need to use the origin=http://yourdomain or origin=https://yourdomain for YT Api issues !
YouTube Video via Options
Boxed version
YouTube Video will be added via Options. The Following example shows an embeded YouTube Video which is loaded only on Demand. in a caption (460px X 259px), i.e.:
<div class="tp-caption sfl fadeout tp-videolayer"
data-x="center" data-hoffset="134"
data-y="center" data-voffset="-6"
data-speed="600"
data-start="1000"
data-easing="Power4.easeOut"
data-endspeed="500"
data-endeasing="Power4.easeOut"
data-autoplay="true"
data-autoplayonlyfirsttime="true"
data-nextslideatend="true"
style="z-index: 8"
data-ytid="T8--OggjJKQ"
data-videoattributes="enablejsapi=1&html5=1&hd=1&wmode=opaque&showinfo=0&rel=0"
data-videocontrols="controls"
data-videowidth="640"
data-videoheight="360">
</div>
围绕打造顶级品牌网站,提升用户体验,欧博持续打磨更优质的服务。
欧博专注实时追踪电竞赛事数据,助力品牌发声,为用户提供专业可靠的体验。
<div class="tp-caption sfl fadeout fulllscreenvideo tp-videolayer"
data-x="0"
data-y="0"
data-speed="600"
data-start="1000"
data-easing="Power4.easeOut"
data-endspeed="500"
data-endeasing="Power4.easeOut"
data-autoplay="true"
data-autoplayonlyfirsttime="true"
data-nextslideatend="true"
style="z-index: 8"
data-ytid="T8--OggjJKQ"
data-videoattributes="enablejsapi=1&html5=1&hd=1&wmode=opaque&showinfo=0&rel=0"
data-videocontrols="controls"
data-videowidth="100%"
data-videoheight="100%">
</div>
Vimeo Video via iFrame
Vimeo Video API works only Online. It will not work well on Localhost due some Sandbox Security reason. Please always test it Online.
Boxed Version
<div class="caption fade "
data-autoplay="true"
data-nextslideatend="false"
data-x="190"
data-y="110"
data-speed="500"
data-start="10"
data-easing="easeOutBack">
<iframe src="http://player.vimeo.com/video/29298709?title=0&byline=0&portrait=0;api=1" width="460" height="259"></iframe>
</div>
FullWidth Version (i.e.)
<div class="caption fade fullscreenvideo"
data-autoplay="true"
data-nextslideatend="true"
data-x="0"
data-y="0"
data-speed="500"
data-start="10"
data-easing="easeOutBack">
<iframe src="http://player.vimeo.com/video/29298709?title=0&byline=0&portrait=0;api=1" width="100%" height="100%"></iframe>
</div>
Vimeo Video via Options
Vimeo Video API works only Online. It will not work well on Localhost due some Sandbox Security reason. Please always test it Online. Vimeo Video will be added via Options. The Following example shows an embeded Vimeo Video which is loaded only on Demand in a Layer (460px X 259px), i.e.:
Boxed version
<div class="tp-caption sfl fadeout tp-videolayer"
data-x="center" data-hoffset="134"
data-y="center" data-voffset="-6"
data-speed="600"
data-start="1000"
data-easing="Power4.easeOut"
data-endspeed="500"
data-endeasing="Power4.easeOut"
data-autoplay="true"
data-autoplayonlyfirsttime="true"
data-nextslideatend="true"
style="z-index: 8"
data-vimeoid="29298709"
data-videoattributes="enablejsapi=1&html5=1&hd=1&wmode=opaque&showinfo=0&rel=0"
data-videocontrols="controls"
data-videowidth="640"
data-videoheight="360">
</div>
在深度挖掘并包装品牌核心价值方面,欧博提供贴心周到的支持。
<div class="tp-caption sfl fadeout 欧博以提供全方位的互联网品牌行销解决方案为核心,带来高效便捷的体验。"
data-x="0"
data-y="0"
data-speed="600"
data-start="1000"
data-easing="Power4.easeOut"
data-endspeed="500"
data-endeasing="Power4.easeOut"
data-autoplay="true"
data-autoplayonlyfirsttime="true"
data-nextslideatend="true"
style="z-index: 8"
data-vimeoid="29298709"
data-videoattributes="enablejsapi=1&html5=1&hd=1&wmode=opaque&showinfo=0&rel=0"
data-videocontrols="controls"
data-videowidth="100%"
data-videoheight="100%">
</div>
HTML5 Video via Video Markups
The HTML5 Files are only loaded if the html5 video markup exist.
Boxed Version (i.e.)
<div class="caption randomrotate "
data-x="20"
data-y="80"
data-speed="300"
data-start="2100"
data-easing="easeOutExpo"
data-autoplay="true"
data-nextslideatend="false">
<video class="" controls preload="none" width="600" height="240"
poster="http://video-js.zencoder.com/oceans-clip.png" >
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English" />
</video>
</div>
想了解更多实时追踪电竞赛事数据,助力品牌发声相关内容,尽在欧博。
<div class="caption randomrotate fullscreenvideo"
data-x="0"
data-y="0"
data-speed="300"
data-start="2100"
data-easing="easeOutExpo"
data-autoplay="true"
data-nextslideatend="true">
<video class="" controls preload="none" width="100%" height="100%"
poster="http://video-js.zencoder.com/oceans-clip.png" >
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English" />
</video>
</div>
HTML5 Video via Options
Boxed version
<div class="tp-caption sfl fadeout tp-videolayer"
data-x="center" data-hoffset="134"
data-y="center" data-voffset="-6"
data-speed="600"
data-start="1000"
data-easing="Power4.easeOut"
data-endspeed="500"
data-endeasing="Power4.easeOut"
data-autoplay="true"
data-autoplayonlyfirsttime="false"
data-nextslideatend="true"
data-videowidth="640"
data-videoheight="320"
data-videopreload="meta"
data-videomp4="http://themepunch.com/revolution/wp-content/uploads/2014/05/among_the_stars.mp4"
data-videowebm="http://themepunch.com/revolution/wp-content/uploads/2014/05/among_the_stars.webm"
data-videocontrols="none"
data-forcecover="0"
data-forcerewind="off"
data-aspectratio="16:9"
data-volume="mute"
data-videoposter="http://themepunch.com/revolution/wp-content/uploads/2014/05/video_space_cover.jpg"
>
</div>
欧博围绕打造顶级品牌网站,提升用户体验不断创新,回应用户的真实需求。
<div class="tp-caption sfl fadeout 精选欧博官网内容,欧博与你一同发现更多精彩。"
data-x="0"
data-y="0"
data-speed="600"
data-start="1000"
data-easing="Power4.easeOut"
data-endspeed="500"
data-endeasing="Power4.easeOut"
data-autoplay="true"
data-autoplayonlyfirsttime="false"
data-nextslideatend="true"
data-videowidth="100%"
data-videoheight="100%"
data-videopreload="meta"
data-videomp4="http://themepunch.com/revolution/wp-content/uploads/2014/05/among_the_stars.mp4"
data-videowebm="http://themepunch.com/revolution/wp-content/uploads/2014/05/among_the_stars.webm"
data-videocontrols="none"
data-forcecover="1"
data-forcerewind="on"
data-aspectratio="16:9"
data-volume="mute"
data-videoposter="http://themepunch.com/revolution/wp-content/uploads/2014/05/video_space_cover.jpg">
</div>
横幅计时器
In order to use a banner timer, you will need to add the markup within the banner or fullwidthbanner divs.
The markup should look like :
Top Positioned Banner Timer:
<div class="tp-bannertimer"></div>
Bottom Positioned Banner Timer:
<div class="tp-bannertimer tp-bottom"></div>
To Hide the Banner Timer:
To remove this timer just simple set the option to hideTimerBar:"on" due the Initialising process
In case you wish to show a single image instead of the Slider on Slower Browsers / mobiles, please simple use the aimg and aie8, amobile data attributes as shown here
<div class="tp-banner" data-aimg="../examples&source/images/slidebg1.jpg" data-aie8="enabled" data-amobile="enabled">...
Auto-Responsive Layout
Responsive means that the slider will adjust to every screen width. The Sourrounding Container Size will define the Max width of the Slider. The Height will be auto calculated.
The basic containers are build like this ( in none Fullwidth, but 4 Level Responsive Version):
.bannercontainer {
width:100%;
position:relative;
padding:0;
}
.banner{
width:100%;
position:relative;
}
FullScreen Layout
You can use the Slider also in FullScreen mode. It will need to have the possiblity to use the full width of the screen, means do not wrap it in any boxed container. For Fullscreen simple use the following markups and styles:
The markup could look like:
<div class="fullscreen-container">
<div class="fullscreenbanner">
</div>
</div>
The Style has 100% width and height simple.
.fullscreen-container {
width:100%;
position:relative;
padding:0;
} Dont forget to use the option fullScreen:"on" to use in the initialisation. If you wish to have an offset, which allows you to add i.e. a Menu over the fullscreen slider, just use the fullScreenOffsetContainer: option and set it to the container which wrapps the menu i.e
The slider offers a public API which you can use to control component inside the Slider from within your own scripts. To access this api, use the following code.
var tpj=jQuery;
tpj.noConflict();
tpj(document).ready(function() {
if (tpj.fn.cssOriginal!=undefined)
tpj.fn.css = tpj.fn.cssOriginal;
var api = tpj('.banner').revolution(
....
You can see in the example index-responsive-API.html how to use the different functions, and how to get the trigered Events.
Once this is done you may use any of the following functions:
- api.revpause() - Stops the Timer and autoplay
- api.revresume() - Starts the Timer and resume to autoplay
- api.revprev() - Change to previous slide
- api.revnext() - Change to next slide
- api.revshowslide(n) - Change to the slide with index Nr. (n)
- api.revmaxslide() - Show the amount of slides
- api.revscroll() - Scrollt Body under the Slide in FullScreen mode
Or you may use any of the following Events:
- revolution.slide.onchange - Event is triggered when Slide has been rotated. data value will give you the current slide. i.e.
api.bind("revolution.slide.onchange",function (e,data) {
jQuery('#callbackinfo').html('Last Event: Slide Changed to '+data.slideIndex);
});
- revolution.slide.onpause - Event is triggered when Slider is on Pause
- revolution.slide.onresume - Event is triggered when Slider is back from Pause
- revolution.slide.onvideoplay - Event is triggered when YouTube or Vimeo Video has been started (only Online Mode !)
- revolution.slide.onvideostop - Event is triggered when YouTube or Vimeo Video has been stopped or Slide has been rotated (only Online Mode !)
- revolution.slide.onstop - - Event is triggered when slider has been stopped due the Loop and stop at Slide parameters
- revolution.slide.onbeforeswap - - Event is triggered when slider is going to change to next slide
- revolution.slide.onafterswap - - Event is triggered when slider has finnishded the change of the transition (full transition finnished)
- revolution.slide.onloaded - - Event is triggered when slider is loaded and it is prepared
Used Assets
- Template demo images licensed from Fotolia for preview usage. Please do not attempt to rip the images from the preview!
If you face problems with the installation or customization of our product please do not hesitate to contact us via our support ticket system:
http://themepunch.ticksy.com