jquery html5超酷上下3D翻轉幻燈片切換特效代碼演示



112 447 150



特效描述: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

加群請備注:從官網了解到

老夫子电子