gpt4 book ai didi

jquery - JSSOR 画廊 : Captions on Image Gallery w Vertical bar?

转载 作者:行者123 更新时间:2023-12-01 04:49:25 26 4
gpt4 key购买 nike

是否可以在 jssor“Image Gallery w Vertical bar”示例上添加标题?如果可能的话,我想在实际的 HTML 而不是 js 中完成它,因为我正在使用 Ruby on Rails。

类似于:

<% @images.each do |image|  %>
<div>
<img u="image" caption="<%= image['caption'] -%>" src="<%= image['fullsize'] -%>" />
<img u="thumb" src="<%= image['thumb'] -%>" />
</div>
<% end -%>

最佳答案

<script>
...
var _CaptionTransitions = [];
_CaptionTransitions["CLIP|LR"] = {$Duration: 900, $Clip: 3, $Easing: $JssorEasing$.$EaseInOutCubic };
var options = {
...
$CaptionSliderOptions: { //[Optional] Options which specifies how to animate caption
$Class: $JssorCaptionSlider$, //[Required] Class to create instance to animate caption
$CaptionTransitions: _CaptionTransitions, //[Required] An array of caption transitions to play caption, see caption transition section at jssor slideshow transition builder
$PlayInMode: 1, //[Optional] 0 None (no play), 1 Chain (goes after main slide), 3 Chain Flatten (goes after main slide and flatten all caption animations), default value is 1
$PlayOutMode: 3 //[Optional] 0 None (no play), 1 Chain (goes before main slide), 3 Chain Flatten (goes before main slide and flatten all caption animations), default value is 1
},

...
};
...
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
</script>
<% @images.each do |image| %>
<div>
<img u="image" caption="<%= image['caption'] -%>" src="<%= image['fullsize'] -%>" />
<img u="thumb" src="<%= image['thumb'] -%>" />
<div u="caption" t="CLIP|LR" style="position:absolute; left:20px; top: 30px; width:300px; height:30px;">
Jssor Slider, touch swipe
</div>
</div>
<% end -%>

关于jquery - JSSOR 画廊 : Captions on Image Gallery w Vertical bar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23093493/

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