Jssor Slider:在幻灯片放映开始之前字幕会重叠一小段时间
Jssor Slider: Captions overlap for a short time before slideshow starts
我有3张幻灯片的简单幻灯片caption-only,如下:
<div id="sliderHeader_container" style="position: relative; width: 965px; height: 85px;">
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width:965px; height:85px; overflow: hidden;">
<!-- Slide -->
<div>
<div u="caption" t="L|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 13px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 19px; line-height: 25px; text-align: center;">
CAPTION 1
</div>
</div>
</div>
<!-- Slide -->
<div>
<div u="caption" t="R|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 0px; left: 220px; width: 965px; height: 85px; color: Black; font-size: 16px; line-height: 17px; text-align: left;">
CAPTION 2
</div>
</div>
</div>
<!-- Slide -->
<div>
<div u="caption" t="SPACESHIP|LB" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 15px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 18px; line-height: 20px; text-align: center;">
CAPTION 3
</div>
</div>
</div>
</div>
</div>
有时(通常是第一次加载页面时,或在速度较慢的移动设备上)所有三个字幕会一起显示(重叠)一小段时间(不到 1 秒)。之后,幻灯片按预期开始。
这是我的初始化代码:
jQuery(document).ready(function ($) {
var _CaptionTransitions = [];
_CaptionTransitions["L|EP"] = {$Duration:1200,$FlyDirection:1,$Easing:{$Left:$JssorEasing$.$EaseInOutExpo},$ScaleHorizontal:0.6,$Opacity:2};
_CaptionTransitions["R|EP"] = {$Duration:1200,$FlyDirection:2,$Easing:{$Left:$JssorEasing$.$EaseInOutExpo},$ScaleHorizontal:0.6,$Opacity:2};
_CaptionTransitions["SPACESHIP|LB"] = {$Duration:1200,$Zoom:3,$Rotate:-0.1,$FlyDirection:9,$Easing:{$Left:$JssorEasing$.$EaseInQuint,$Top:$JssorEasing$.$EaseInWave,$Opacity:$JssorEasing$.$EaseInQuint},$ScaleHorizontal:1,$ScaleVertical:0.1,$Opacity:2};
var options = {
$AutoPlay: true,
$DragOrientation: 1,
$SlideDuration: 0,
$AutoPlayInterval: 10000,
$CaptionSliderOptions: {
$Class: $JssorCaptionSlider$,
$CaptionTransitions: _CaptionTransitions,
$PlayInMode: 1,
$PlayOutMode: 3
}
};
var jssor_slider_header = new $JssorSlider$("sliderHeader_container", options);
});
有人遇到过同样的行为吗?我想知道在 Jssor 幻灯片准备好开始之前是否有隐藏所有字幕的方法。
提前致谢。
它看起来像您在加载页面时所说的那样。
您可以立即使用无 jquery 版本到 运行 jssor 滑块,而无需等待加载。
或者您可以只显示一张幻灯片并在开头隐藏 (style="display: none;") 其他幻灯片。
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width:965px; height:85px; overflow: hidden;">
<!-- Slide -->
<div>
<div u="caption" t="L|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 13px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 19px; line-height: 25px; text-align: center;">
CAPTION 1
</div>
</div>
</div>
<!-- Slide -->
<div style="display: none;">
<div u="caption" t="R|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 0px; left: 220px; width: 965px; height: 85px; color: Black; font-size: 16px; line-height: 17px; text-align: left;">
CAPTION 2
</div>
</div>
</div>
<!-- Slide -->
<div style="display: none;">
<div u="caption" t="SPACESHIP|LB" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 15px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 18px; line-height: 20px; text-align: center;">
CAPTION 3
</div>
</div>
</div>
</div>
我有3张幻灯片的简单幻灯片caption-only,如下:
<div id="sliderHeader_container" style="position: relative; width: 965px; height: 85px;">
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width:965px; height:85px; overflow: hidden;">
<!-- Slide -->
<div>
<div u="caption" t="L|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 13px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 19px; line-height: 25px; text-align: center;">
CAPTION 1
</div>
</div>
</div>
<!-- Slide -->
<div>
<div u="caption" t="R|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 0px; left: 220px; width: 965px; height: 85px; color: Black; font-size: 16px; line-height: 17px; text-align: left;">
CAPTION 2
</div>
</div>
</div>
<!-- Slide -->
<div>
<div u="caption" t="SPACESHIP|LB" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 15px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 18px; line-height: 20px; text-align: center;">
CAPTION 3
</div>
</div>
</div>
</div>
</div>
有时(通常是第一次加载页面时,或在速度较慢的移动设备上)所有三个字幕会一起显示(重叠)一小段时间(不到 1 秒)。之后,幻灯片按预期开始。
这是我的初始化代码:
jQuery(document).ready(function ($) {
var _CaptionTransitions = [];
_CaptionTransitions["L|EP"] = {$Duration:1200,$FlyDirection:1,$Easing:{$Left:$JssorEasing$.$EaseInOutExpo},$ScaleHorizontal:0.6,$Opacity:2};
_CaptionTransitions["R|EP"] = {$Duration:1200,$FlyDirection:2,$Easing:{$Left:$JssorEasing$.$EaseInOutExpo},$ScaleHorizontal:0.6,$Opacity:2};
_CaptionTransitions["SPACESHIP|LB"] = {$Duration:1200,$Zoom:3,$Rotate:-0.1,$FlyDirection:9,$Easing:{$Left:$JssorEasing$.$EaseInQuint,$Top:$JssorEasing$.$EaseInWave,$Opacity:$JssorEasing$.$EaseInQuint},$ScaleHorizontal:1,$ScaleVertical:0.1,$Opacity:2};
var options = {
$AutoPlay: true,
$DragOrientation: 1,
$SlideDuration: 0,
$AutoPlayInterval: 10000,
$CaptionSliderOptions: {
$Class: $JssorCaptionSlider$,
$CaptionTransitions: _CaptionTransitions,
$PlayInMode: 1,
$PlayOutMode: 3
}
};
var jssor_slider_header = new $JssorSlider$("sliderHeader_container", options);
});
有人遇到过同样的行为吗?我想知道在 Jssor 幻灯片准备好开始之前是否有隐藏所有字幕的方法。
提前致谢。
它看起来像您在加载页面时所说的那样。 您可以立即使用无 jquery 版本到 运行 jssor 滑块,而无需等待加载。
或者您可以只显示一张幻灯片并在开头隐藏 (style="display: none;") 其他幻灯片。
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width:965px; height:85px; overflow: hidden;">
<!-- Slide -->
<div>
<div u="caption" t="L|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 13px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 19px; line-height: 25px; text-align: center;">
CAPTION 1
</div>
</div>
</div>
<!-- Slide -->
<div style="display: none;">
<div u="caption" t="R|EP" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 0px; left: 220px; width: 965px; height: 85px; color: Black; font-size: 16px; line-height: 17px; text-align: left;">
CAPTION 2
</div>
</div>
</div>
<!-- Slide -->
<div style="display: none;">
<div u="caption" t="SPACESHIP|LB" style="position: absolute; top: 0px; left: 0px; width: 965px; height: 85px;">
<div style="position: absolute; top: 15px; left: 0px; width: 965px; height: 85px; color: Black; font-size: 18px; line-height: 20px; text-align: center;">
CAPTION 3
</div>
</div>
</div>
</div>