本文共 9183 字,大约阅读时间需要 30 分钟。
JS 实现3D立体效果的图片幻灯切换 对于使用IE6的同学看到的斑点,我只能表示很无奈。。。
JS 实现3D立体效果的图片幻灯切换 IE6可能不支持
全屏图片切换 $(window).load(function() { $('.flexslider').flexslider({ animation: "fade", //String: Select your animation type, "fade" or "slide" 图片变换方式:淡入淡出或者滑动 slideDirection: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" 图片设置为滑动式时的滑动方向:左右或者上下 slideshow: true, //Boolean: Animate slider automatically 载入页面时,是否自动播放 slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds 自动播放速度毫秒 animationDuration: 600, //Integer: Set the speed of animations, in milliseconds 动画淡入淡出效果延时 directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false) 是否显示左右控制按钮 controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage 是否显示控制菜单 keyboardNav: true, //Boolean: Allow slider navigating via keyboard left/right keys 键盘左右方向键控制图片滑动 mousewheel: false, //Boolean: Allow slider navigating via mousewheel 鼠标滚轮控制制图片滑动 prevText: "Previous", //String: Set the text for the "previous" directionNav item 设置文本的字符串:“以前的”directionnav项目 nextText: "Next", //String: Set the text for the "next" directionNav item 看过《文本字符串:“下”的directionnav item pausePlay: false, //Boolean: Create pause/play dynamic element 布尔:create暂停/播放动态元素 pauseText: 'Pause', //String: Set the text for the "pause" pausePlay item 字符串:设置文字为“暂停”pauseplay项目 playText: 'Play', //String: Set the text for the "play" pausePlay item 字符串:在“玩”pauseplay项设置文本 randomize: false, //Boolean: Randomize slide order 是否随即幻灯片 slideToStart: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)初始化第一次显示图片位置 animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end 是否循环滚动 pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. 布尔:暂停幻灯片的控制要素互动的时候,强烈推荐。 pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering 布尔:暂停幻灯片演示当鼠标悬停的滑块,然后恢复时不再徘徊 controlsContainer: "", //Selector: Declare which container the navigation elements should be appended too. Default container is the flexSlider element. Example use would be ".flexslider-container", "#container", etc. If the given element is not found, the default action will be taken. 该导航元素的容器说,这应该是appended太。默认的容器是flexslider元。实例的使用将是“容器”,# .flexslider“容器”,等等。如果没有发现了元素的默认行为,将被考虑。 manualControls: "", //Selector: Declare custom control navigation. Example would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.自定义控制导航 manualControlEvent:"", //String:自定义导航控制触发事件:默认是click,可以设定hover start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide 回调:功能(滑块)-当滑块加载第一个幻灯片时触发 before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation 回调:功能(滑块)-与每个滑块动画异步触发 after: function(){}, //Callback: function(slider) - Fires after each slider animation completes 回调:功能(滑块)-每个滑块动画完成后触发 end: function(){} //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) 当滑块到达上一个幻灯片(异步)时发生火灾 });});
$(window).load(function() { $('.flexslider').flexslider({ animation: "fade", //String: Select your animation type, "fade" or "slide" 图片变换方式:淡入淡出或者滑动 slideDirection: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" 图片设置为滑动式时的滑动方向:左右或者上下 slideshow: true, //Boolean: Animate slider automatically 载入页面时,是否自动播放 slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds 自动播放速度毫秒 animationDuration: 600, //Integer: Set the speed of animations, in milliseconds 动画淡入淡出效果延时 directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false) 是否显示左右控制按钮 controlNav: true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage 是否显示控制菜单 keyboardNav: true, //Boolean: Allow slider navigating via keyboard left/right keys 键盘左右方向键控制图片滑动 mousewheel: false, //Boolean: Allow slider navigating via mousewheel 鼠标滚轮控制制图片滑动 prevText: "Previous", //String: Set the text for the "previous" directionNav item 设置文本的字符串:“以前的”directionnav项目 nextText: "Next", //String: Set the text for the "next" directionNav item 看过《文本字符串:“下”的directionnav item pausePlay: false, //Boolean: Create pause/play dynamic element 布尔:create暂停/播放动态元素 pauseText: 'Pause', //String: Set the text for the "pause" pausePlay item 字符串:设置文字为“暂停”pauseplay项目 playText: 'Play', //String: Set the text for the "play" pausePlay item 字符串:在“玩”pauseplay项设置文本 randomize: false, //Boolean: Randomize slide order 是否随即幻灯片 slideToStart: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)初始化第一次显示图片位置 animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end 是否循环滚动 pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. 布尔:暂停幻灯片的控制要素互动的时候,强烈推荐。 pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering 布尔:暂停幻灯片演示当鼠标悬停的滑块,然后恢复时不再徘徊 controlsContainer: "", //Selector: Declare which container the navigation elements should be appended too. Default container is the flexSlider element. Example use would be ".flexslider-container", "#container", etc. If the given element is not found, the default action will be taken. 该导航元素的容器说,这应该是appended太。默认的容器是flexslider元。实例的使用将是“容器”,# .flexslider“容器”,等等。如果没有发现了元素的默认行为,将被考虑。 manualControls: "", //Selector: Declare custom control navigation. Example would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.自定义控制导航 manualControlEvent:"", //String:自定义导航控制触发事件:默认是click,可以设定hover start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide 回调:功能(滑块)-当滑块加载第一个幻灯片时触发 before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation 回调:功能(滑块)-与每个滑块动画异步触发 after: function(){}, //Callback: function(slider) - Fires after each slider animation completes 回调:功能(滑块)-每个滑块动画完成后触发 end: function(){} //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) 当滑块到达上一个幻灯片(异步)时发生火灾 });});