jquery.slicebox酷炫的html5 3d图片轮播幻灯片切换效果



157 625 209



特效描述:jquery.slicebox html5 3d图片轮播 幻灯片切换效果,html5 3d图片轮播幻灯片切换效果

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/slicebox.css" />
<link rel="stylesheet" type="text/css" href="css/custom.css" />

2. 引入JS

<script type="text/javascript" src="js/modernizr.custom.46884.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.slicebox.js"></script>

3. HTML代码

<div class="more">
	<ul id="sb-examples">
		<li>More examples:</li>
		<li class="selected"><a href="index.html">Example 1</a></li>
		<li><a href="index2.html">Example 2</a></li>
		<li><a href="index3.html">Example 3</a></li>
		<li><a href="index4.html">Example 4</a></li>
	</ul>
</div>
<div class="wrapper">
	<ul id="sb-slider" class="sb-slider">
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/1.jpg" alt="image1"/></a>
			<div class="sb-description">
				<h3>Creative Lifesaver</h3>
			</div>
		</li>
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/2.jpg" alt="image2"/></a>
			<div class="sb-description">
				<h3>Honest Entertainer</h3>
			</div>
		</li>
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/3.jpg" alt="image1"/></a>
			<div class="sb-description">
				<h3>Brave Astronaut</h3>
			</div>
		</li>
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/4.jpg" alt="image1"/></a>
			<div class="sb-description">
				<h3>Affectionate Decision Maker</h3>
			</div>
		</li>
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/5.jpg" alt="image1"/></a>
			<div class="sb-description">
				<h3>Faithful Investor</h3>
			</div>
		</li>
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/6.jpg" alt="image1"/></a>
			<div class="sb-description">
				<h3>Groundbreaking Artist</h3>
			</div>
		</li>
		<li>
			<a href="http://www.51qianduan.com/" target="_blank"><img src="images/7.jpg" alt="image1"/></a>
			<div class="sb-description">
				<h3>Selfless Philantropist</h3>
			</div>
		</li>
	</ul>
	<div id="shadow" class="shadow"></div>
	<div id="nav-arrows" class="nav-arrows">
		<a href="#">Next</a>
		<a href="#">Previous</a>
	</div>
	<div id="nav-dots" class="nav-dots">
		<span class="nav-dot-current"></span>
		<span></span>
		<span></span>
		<span></span>
		<span></span>
		<span></span>
		<span></span>
	</div>
</div><!-- /wrapper -->
<script type="text/javascript">
$(function() {
	var Page = (function() {
		var $navArrows = $( '#nav-arrows' ).hide(),
			$navDots = $( '#nav-dots' ).hide(),
			$nav = $navDots.children( 'span' ),
			$shadow = $( '#shadow' ).hide(),
			slicebox = $( '#sb-slider' ).slicebox( {
				onReady : function() {
					$navArrows.show();
					$navDots.show();
					$shadow.show();
				},
				onBeforeChange : function( pos ) {
					$nav.removeClass( 'nav-dot-current' );
					$nav.eq( pos ).addClass( 'nav-dot-current' );
				}
			} ),
			init = function() {
				initEvents();
			},
			initEvents = function() {
				// add navigation events
				$navArrows.children( ':first' ).on( 'click', function() {
					slicebox.next();
					return false;
				} );
				$navArrows.children( ':last' ).on( 'click', function() {
					slicebox.previous();
					return false;
				} );
				$nav.each( function( i ) {
					$( this ).on( 'click', function( event ) {
						var $dot = $( this );
						if( !slicebox.isActive() ) {
							$nav.removeClass( 'nav-dot-current' );
							$dot.addClass( 'nav-dot-current' );
						}
						slicebox.jump( i + 1 );
						return false;
					} );
				} );
			};
			return { init : init };
	})();
	Page.init();
});
</script>



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


热门标签: 滚动切换 滚动条切换 滑动选项卡 滑动切换 flash焦点图 flash幻灯片 flashbanner flash图片轮播 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 滑动手风琴 旋转翻转 旋转 翻转 切换按钮 表单 表单美化 表单插件 表单美化插件 焦点图 幻灯片 轮播图 bar焦点图 图片翻转 图片旋转 带标题的焦点图 图片切换 图片选项卡 图标选项卡 纯图片轮播 图片轮播 选项卡自动切换 按钮控制

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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