jquery html5超酷上下3D翻转幻灯片切换特效代码演示



107 424 142



特效描述:jqueryhtml5 超酷上下3D翻转 幻灯片切换特效,3D轮播效果

代码结构

1. 引入CSS

<link href="Ban3D/screen.css" rel="stylesheet">

2. 引入JS

<script src="Ban3D/modernizr.js"></script>
<script type="text/javascript" src="Ban3D/jquery_1_7_2.js"></script>
<script type="text/javascript" src="Ban3D/box-slider-all.js"></script>

3. HTML代码

<div id="page">
	<section>
		<div id="viewport-shadow">
			<a href="#" id="prev" title="go to the next slide"></a>
			<a href="#" id="next" title="go to the next slide"></a>
			<div id="viewport">
				<div id="box">
					<figure class="slide"><img src="img/the-battle.jpg"> </figure>
					<figure class="slide"><img src="img/hiding-the-map.jpg"> </figure>
					<figure class="slide"><img src="img/theres-the-buoy.jpg"> </figure>
					<figure class="slide"><img src="img/finding-the-key.jpg"> </figure>
					<figure class="slide"><img src="img/lets-get-out-of-here.jpg"> </figure>
				</div>
			</div>
			<div id="time-indicator"></div>
		</div>
		<footer>
			<nav class="slider-controls">
				<ul id="controls">
					<li><a class="goto-slide current" href="#" data-slideindex="0"></a></li>
					<li><a class="goto-slide" href="#" data-slideindex="1"></a></li>
					<li><a class="goto-slide" href="#" data-slideindex="2"></a></li>
					<li><a class="goto-slide" href="#" data-slideindex="3"></a></li>
					<li><a class="goto-slide" href="#" data-slideindex="4"></a></li>
				</ul>
			</nav>
		</footer>
	</section>
	<aside id="effect-switcher">
		<h2>Select effect</h2>
		<ul id="effect-list">
			<li><a href="#" class="effect current" data-fx="scrollVert3d">Vertical 3D scroll</a></li>
			<li><a href="#" class="effect" data-fx="scrollHorz3d">Horizontal 3D scroll</a></li>
			<li><a href="#" class="effect" data-fx="scrollVert">Vertical scroll</a></li>
			<li><a href="#" class="effect" data-fx="scrollHorz">Horizontal scroll</a></li>
			<li><a href="#" class="effect" data-fx="blindLeft">Blind left</a></li>
			<li><a href="#" class="effect" data-fx="blindDown">Blind down</a></li>
			<li><a href="#" class="effect" data-fx="fade">Fade</a></li>
		</ul>
	</aside>
</div>
<script type="text/javascript" src="Ban3D/box-slider-all.js"></script> 
<script type="text/javascript">
$(function (){
var $box = $('#box')
, $indicators = $('.goto-slide')
, $effects = $('.effect')
, $timeIndicator = $('#time-indicator')
, slideInterval = 5000;
var switchIndicator = function ($c, $n, currIndex, nextIndex) {
$timeIndicator.stop().css('width', 0);
$indicators.removeClass('current').eq(nextIndex).addClass('current');
};
var startTimeIndicator = function () {
$timeIndicator.animate({width: '680px'}, slideInterval);
};
// initialize the plugin with the desired settings
$box.boxSlider({
speed: 1000
, autoScroll: true
, timeout: slideInterval
, next: '#next'
, prev: '#prev'
, pause: '#pause'
, effect: 'scrollVert3d'
, blindCount: 15
, onbefore: switchIndicator
, onafter: startTimeIndicator
});
startTimeIndicator();
// pagination isn't built in simply because it's easy to
// roll your own with the plugin API methods
$('#controls').on('click', '.goto-slide', function (ev) {
$box.boxSlider('showSlide', $(this).data('slideindex'));
ev.preventDefault();
});
$('#effect-list').on('click', '.effect', function (ev) {
var $effect = $(this);
$box.boxSlider('option', 'effect', $effect.data('fx'));
$effects.removeClass('current');
$effect.addClass('current');
switchIndicator(null, null, 0, 0);
ev.preventDefault();
});
});
</script>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动切换 滚动条切换 滑动选项卡 滑动切换 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 滑动手风琴 滑动星星打分 旋转翻转 旋转 翻转 切换按钮 表单 表单美化 表单插件 表单美化插件 其他 图片翻转 图片旋转 图片切换 图片选项卡 图标选项卡 选项卡自动切换 按钮控制 进度条 进度条插件

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到