- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在网站上使用 jQuery 版本的 Slider Revolution。我已经多次使用它而没有问题,但在这种情况下,我的幻灯片过渡效果不佳。我尝试了几种不同的过渡,但没有成功,但其他一切都很完美。我在控制台中没有收到任何错误,而且我的想法已经用完了。
这是我使用的标记:
<div id="rev_slider_1" class="rev_slider" data-version="5.4.1" style="display:none;">
<ul>
<li data-transition="fade">
<!-- SLIDE'S MAIN BACKGROUND IMAGE -->
<div class="kicker-promo no-margin">
<a href="/">
<img alt="" class="kicker-promo-img" src="http://s7d9.scene7.com/is/image/AmericanApparel/aa_web_hp_update_040918_desktop_01_us?qlt=90,1" class="rev-slidebg">
<img alt="" class="kicker-promo-img-overlay" src="http://s7d9.scene7.com/is/image/AmericanApparel/aa_web_hp_update_040918_desktop_01_overlay_us?qlt=90,1" class="rev-slidebg">
</a>
</div>
</li>
<li data-transition="fade">
<!-- SLIDE'S MAIN BACKGROUND IMAGE -->
<div class="kicker-promo no-margin">
<a href="/">
<img alt="" class="kicker-promo-img" src="http://s7d9.scene7.com/is/image/AmericanApparel/aa_web_hp_update_040918_desktop_02_us?qlt=90,1" class="rev-slidebg">
<img alt="" class="kicker-promo-img-overlay" src="http://s7d9.scene7.com/is/image/AmericanApparel/aa_web_hp_update_040918_desktop_02_overlay_us?qlt=90,1" class="rev-slidebg">
</a>
</div>
</li>
</ul>
slider 设置:
<script type="text/javascript">
/* https://learn.jquery.com/using-jquery-core/document-ready/ */
jQuery(document).ready(function() {
/* initialize the slider based on the Slider's ID attribute */
jQuery('#rev_slider_1').show().revolution({
sliderType:"standard",
sliderLayout:"auto",
dottedOverlay:"none",
delay:3000,
navigation: {
keyboardNavigation:"off",
keyboard_direction: "horizontal",
mouseScrollNavigation:"off",
mouseScrollReverse:"default",
onHoverStop:"off",
touch:{
touchenabled:"on",
swipe_threshold: 75,
swipe_min_touches: 1,
swipe_direction: "horizontal",
drag_block_vertical: false
}
,
bullets: {
enable: true,
style: 'hermes',
container: 'slider',
h_align: 'center',
v_align: 'bottom',
h_offset: 0,
v_offset: 20,
space: 5
}
},
viewPort: {
enable:true,
outof:"pause",
visible_area:"100%",
presize:false
},
responsiveLevels:[1240,1024,778,480],
visibilityLevels:[1240,1024,778,480],
gridwidth:[1230,1024,767,480],
gridheight:[720,720,480,360],
lazyType:"none",
parallax: {
type:"scroll",
origo:"enterpoint",
speed:400,
levels:[5,10,15,20,25,30,35,40,45,50,46,47,48,49,50,55],
type:"scroll",
},
shadow:0,
spinner:"off",
stopLoop:"off",
stopAfterLoops:-1,
stopAtSlide:-1,
shuffle:"off",
autoHeight:"off",
hideThumbsOnMobile:"off",
hideSliderAtLimit:0,
hideCaptionAtLimit:0,
hideAllCaptionAtLilmit:0,
debugMode:false,
fallbacks: {
simplifyAll:"off",
nextSlideOnWindowFocus:"off",
disableFocusListener:false,
}
});
});
</script>
另一件可能值得注意的事情是,我在这个特定页面上运行了 slider 的三个实例。它们几乎完全相同,并且除了过渡之外都具有功能。
最佳答案
// This should work fine!
$(document).ready(function(e) {
$(".rev_slider").revolution({
sliderType:"standard",
sliderLayout: "auto",
dottedOverlay: "none",
delay: 3000,
navigation: {
keyboardNavigation: "off",
keyboard_direction: "horizontal",
mouseScrollNavigation: "off",
onHoverStop: "off",
touch: {
touchenabled: "on",
swipe_threshold: 75,
swipe_min_touches: 1,
swipe_direction: "horizontal",
drag_block_vertical: false
},
bullets: {
enable:true,
hide_onmobile:true,
hide_under:600,
style:"metis",
hide_onleave:true,
hide_delay:200,
hide_delay_mobile:1200,
direction:"horizontal",
h_align:"center",
v_align:"bottom",
h_offset:0,
v_offset:30,
space:5,
}
},
responsiveLevels: [1240, 1024, 778],
visibilityLevels: [1240, 1024, 778],
gridwidth: [1170, 1024, 778, 480],
gridheight: [600, 768, 960, 720],
lazyType: "none",
parallax: {
origo: "slidercenter",
speed: 1000,
levels: [5, 10, 15, 20, 25, 30, 35, 40, 45, 46, 47, 48, 49, 50, 100, 55],
type: "scroll"
},
shadow: 0,
spinner: "off",
stopLoop: "on",
stopAfterLoops: 0,
stopAtSlide: -1,
shuffle: "off",
autoHeight: "off",
fullScreenAutoWidth: "off",
fullScreenAlignForce: "off",
fullScreenOffsetContainer: "",
fullScreenOffset: "0",
hideThumbsOnMobile: "off",
hideSliderAtLimit: 0,
hideCaptionAtLimit: 0,
hideAllCaptionAtLilmit: 0,
debugMode: false,
fallbacks: {
simplifyAll: "off",
nextSlideOnWindowFocus: "off",
disableFocusListener: false,
}
});
});
关于javascript - Slider Revolution 幻灯片过渡不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49325908/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!