WordPress 中的滑块革命
Slider Revolution in WordPress
我想像演示一样制作滑块:https://ihatetomatoes.net/demos/simple-parallax-scrolling-tutorial/
我可以做视差选项,但我需要演示内容的效果。
滚动时我需要淡出 Slider Revolution 中的内容。
此致,
您将必须编写自定义 Javascript 以命中 RevSlider 中的元素。我现在可以告诉你,这将是一个巨大的痛苦,因为图层上的 类 和 id 将是动态的并且一直在变化。这是一些未经测试的 jQuery 我将它们放在一起帮助您入门。
// Listen to the scroll event on the window element
$(window).scroll(function() {
if ($(this).scrollTop() > 100 ) {
// Find the class and fade it out
// You might need to grab the ID for the layer
$('.rev_layer_class').fadeOut();
} else {
// Fade back in if they scroll back up
$('.rev_layer_class').fadeOut();
}
});
我想像演示一样制作滑块:https://ihatetomatoes.net/demos/simple-parallax-scrolling-tutorial/
我可以做视差选项,但我需要演示内容的效果。 滚动时我需要淡出 Slider Revolution 中的内容。
此致,
您将必须编写自定义 Javascript 以命中 RevSlider 中的元素。我现在可以告诉你,这将是一个巨大的痛苦,因为图层上的 类 和 id 将是动态的并且一直在变化。这是一些未经测试的 jQuery 我将它们放在一起帮助您入门。
// Listen to the scroll event on the window element
$(window).scroll(function() {
if ($(this).scrollTop() > 100 ) {
// Find the class and fade it out
// You might need to grab the ID for the layer
$('.rev_layer_class').fadeOut();
} else {
// Fade back in if they scroll back up
$('.rev_layer_class').fadeOut();
}
});