jquery html5 css3網站內容更新時間軸進度條效果



96 383 128



特效描述:jquery html5css3 網站內容更新 時間軸進度條效果,時間軸兩側的內容隨著滾動條滾動,動畫形式從右側加載到中間,也有時間軸快速跳到想要的月份內容

代碼結構

1. 引入CSS

<link href='http://fonts.googleapis.com/css?family=Kelly+Slab' rel='stylesheet' type='text/css' />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/styleIE.css" />

2. 引入JS

<script type="text/javascript" src="js/modernizr.custom.11333.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>

3. HTML代碼

<div id="ss-links" class="ss-links">
	<a href="#november">Nov</a>
	<a href="#october">Oct</a>
	<a href="#september">Sep</a>
	<a href="#august">Aug</a>
	<a href="#july">Jul</a>
	<a href="#june">Jun</a>
</div>
<div id="ss-container" class="ss-container">
	<div class="ss-row">
		<div class="ss-left">
			<h2 id="november">November</h2>
		</div>
		<div class="ss-right">
			<h2>2011</h2>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-1">Typography Effects with CSS3 and jQuery</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>November 28, 2011</span>
				<a href="http://www.vxisgr.tw/">Typography Effects with CSS3 and jQuery</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<h3>
				<span>November 22, 2011</span>
				<a href="http://www.vxisgr.tw/">Hover and Click Trigger for Circular Elements with jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-2">Hover and Click Trigger for Circular Elements with jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-3">Elastic Image Slideshow with Thumbnail Preview</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>November 21, 2011</span>
				<a href="http://www.vxisgr.tw/">Elastic Image Slideshow with Thumbnail Preview</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<h3>
				<span>November 18, 2011</span>
				<a href="http://www.vxisgr.tw/">Fullscreen Image Blur Effect with HTML5</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-4">Fullscreen Image Blur Effect with HTML5</a>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-5">Interactive Typography Effects with HTML5</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>November 9, 2011</span>
				<a href="http://www.vxisgr.tw/">Interactive Typography Effects with HTML5</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-6">Animated Buttons with CSS3</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>November 7, 2011</span>
				<a href="http://www.vxisgr.tw/">Animated Buttons with CSS3</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<h3>
				<span>November 2, 2011</span>
				<a href="http://www.vxisgr.tw/">Original Hover Effects with CSS3</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-7">Original Hover Effects with CSS3</a>
		</div>
	</div>
	<div class="ss-row">
		<div class="ss-left">
			<h2 id="october">October</h2>
		</div>
		<div class="ss-right">
			<h2>2011</h2>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<h3>
				<span>October 31, 2011</span>
				<a href="http://www.vxisgr.tw/">Fullscreen Image 3D Effect with CSS3 and jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-8">Fullscreen Image 3D Effect with CSS3 and jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-9">Creative CSS3 Animation Menus</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>October 24, 2011</span>
				<a href="http://www.vxisgr.tw/">Creative CSS3 Animation Menus</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-10">Blur Menu with CSS3 Transitions</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>October 19, 2011</span>
				<a href="http://www.vxisgr.tw/">Blur Menu with CSS3 Transitions</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<h3>
				<span>October 17, 2011</span>
				<a href="http://www.vxisgr.tw/">Wave Display Effect with jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-11">Wave Display Effect with jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-12">Flexible Slide-to-top Accordion</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>October 12, 2011</span>
				<a href="http://www.vxisgr.tw/">Flexible Slide-to-top Accordion</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<h3>
				<span>October 10, 2011</span>
				<a href="http://www.vxisgr.tw/">Circle Navigation Effect with CSS3</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-13">Circle Navigation Effect with CSS3</a>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-14">Draggable Image Boxes Grid</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>October 7, 2011</span>
				<a href="http://www.vxisgr.tw/">Draggable Image Boxes Grid</a>
			</h3>
		</div>
	</div>
	<div class="ss-row">
		<div class="ss-left">
			<h2 id="september">September</h2>
		</div>
		<div class="ss-right">
			<h2>2011</h2>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<h3>
				<span>September 30, 2011</span>
				<a href="http://www.vxisgr.tw/">Scrollbar Visibility with jScrollPane</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-15">Scrollbar Visibility with jScrollPane</a>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-16">Multi-level Photo Map</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>September 27, 2011</span>
				<a href="http://www.vxisgr.tw/">Multi-level Photo Map</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-17">Responsive Image Gallery with Thumbnail Carousel</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>September 20, 2011</span>
				<a href="http://www.vxisgr.tw/">Responsive Image Gallery with Thumbnail Carousel</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<h3>
				<span>September 12, 2011</span>
				<a href="http://www.vxisgr.tw/">Elastislide - A Responsive jQuery Carousel Plugin</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-18">Elastislide - A Responsive jQuery Carousel Plugin</a>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-19">Slicebox - A fresh 3D image slider with graceful fallback </a>
		</div>
		<div class="ss-right">
			<h3>
				<span>September 5, 2011</span>
				<a href="http://www.vxisgr.tw/">Slicebox - A fresh 3D image slider with graceful fallback </a>
			</h3>
		</div>
	</div>
	<div class="ss-row">
		<div class="ss-left">
			<h2 id="august">August</h2>
		</div>
		<div class="ss-right">
			<h2>2011</h2>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<h3>
				<span>August 30, 2011</span>
				<a href="http://www.vxisgr.tw/">Automatic Image Montage with jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-20">Automatic Image Montage with jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-21">Image Zoom Tour with jQuery</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>August 23, 2011</span>
				<a href="http://www.vxisgr.tw/">Image Zoom Tour with jQuery</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<h3>
				<span>August 16, 2011</span>
				<a href="http://www.vxisgr.tw/">Circular Content Carousel with jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-22">Circular Content Carousel with jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-23">Portfolio Image Navigation with jQuery</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>August 9, 2011</span>
				<a href="http://www.vxisgr.tw/">Portfolio Image Navigation with jQuery</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<h3>
				<span>August 4, 2011</span>
				<a href="http://www.vxisgr.tw/">Expanding Fullscreen Grid Portfolio</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-24">Expanding Fullscreen Grid Portfolio</a>
		</div>
	</div>
	<div class="ss-row">
		<div class="ss-left">
			<h2 id="july">July</h2>
		</div>
		<div class="ss-right">
			<h2>2011</h2>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-25">Content Rotator with jQuery</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>July 29, 2011</span>
				<a href="http://www.vxisgr.tw/">Content Rotator with jQuery</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<h3>
				<span>July 22, 2011</span>
				<a href="http://www.vxisgr.tw/">Vertical Sliding Accordion with jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-26">Vertical Sliding Accordion with jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-medium">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-27">Animated Text and Icon Menu with jQuery</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>July 12, 2011</span>
				<a href="http://www.vxisgr.tw/">Animated Text and Icon Menu with jQuery</a>
			</h3>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
			<h3>
				<span>July 5, 2011</span>
				<a href="http://www.vxisgr.tw/">Fullscreen Slideshow with HTML5 Audio and jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-30">Fullscreen Slideshow with HTML5 Audio and jQuery</a>
		</div>
	</div>
	<div class="ss-row ss-large">
		<div class="ss-left">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-28">Sliding Background Image Menu with jQuery</a>
		</div>
		<div class="ss-right">
			<h3>
				<span>July 3, 2011</span>
				<a href="http://www.vxisgr.tw/">Sliding Background Image Menu with jQuery</a>
			</h3>
		</div>
	</div>
	<div class="ss-row">
		<div class="ss-left">
			<h2 id="june">June</h2>
		</div>
		<div class="ss-right">
			<h2>2011</h2>
		</div>
	</div>
	<div class="ss-row ss-small">
		<div class="ss-left">
		   <h3>
				<span>June 9, 2011</span>
				<a href="http://www.vxisgr.tw/">Grid Navigation Effects with jQuery</a>
			</h3>
		</div>
		<div class="ss-right">
			<a href="http://www.vxisgr.tw/" class="ss-circle ss-circle-29">Grid Navigation Effects with jQuery</a>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function() {
	var $sidescroll	= (function() {
			// the row elements
		var $rows			= $('#ss-container > div.ss-row'),
			// we will cache the inviewport rows and the outside viewport rows
			$rowsViewport, $rowsOutViewport,
			// navigation menu links
			$links			= $('#ss-links > a'),
			// the window element
			$win			= $(window),
			// we will store the window sizes here
			winSize			= {},
			// used in the scroll setTimeout function
			anim			= false,
			// page scroll speed
			scollPageSpeed	= 2000 ,
			// page scroll easing
			scollPageEasing = 'easeInOutExpo',
			// perspective?
			hasPerspective	= false,
			perspective		= hasPerspective && Modernizr.csstransforms3d,
			// initialize function
			init			= function() {
				// get window sizes
				getWinSize();
				// initialize events
				initEvents();
				// define the inviewport selector
				defineViewport();
				// gets the elements that match the previous selector
				setViewportRows();
				// if perspective add css
				if( perspective ) {
					$rows.css({
						'-webkit-perspective'			: 600,
						'-webkit-perspective-origin'	: '50% 0%'
					});
				}
				// show the pointers for the inviewport rows
				$rowsViewport.find('a.ss-circle').addClass('ss-circle-deco');
				// set positions for each row
				placeRows();
			},
			// defines a selector that gathers the row elems that are initially visible.
			// the element is visible if its top is less than the window's height.
			// these elements will not be affected when scrolling the page.
			defineViewport	= function() {
				$.extend( $.expr[':'], {
					inviewport	: function ( el ) {
						if ( $(el).offset().top < winSize.height ) {
							return true;
						}
						return false;
					}
				});
			},
			// checks which rows are initially visible 
			setViewportRows	= function() {
				$rowsViewport 		= $rows.filter(':inviewport');
				$rowsOutViewport	= $rows.not( $rowsViewport )
			},
			// get window sizes
			getWinSize		= function() {
				winSize.width	= $win.width();
				winSize.height	= $win.height();
			},
			// initialize some events
			initEvents		= function() {
				// navigation menu links.
				// scroll to the respective section.
				$links.on( 'click.Scrolling', function( event ) {
					// scroll to the element that has id = menu's href
					$('html, body').stop().animate({
						scrollTop: $( $(this).attr('href') ).offset().top
					}, scollPageSpeed, scollPageEasing );
					return false;
				});
				$(window).on({
					// on window resize we need to redefine which rows are initially visible (this ones we will not animate).
					'resize.Scrolling' : function( event ) {
						// get the window sizes again
						getWinSize();
						// redefine which rows are initially visible (:inviewport)
						setViewportRows();
						// remove pointers for every row
						$rows.find('a.ss-circle').removeClass('ss-circle-deco');
						// show inviewport rows and respective pointers
						$rowsViewport.each( function() {
							$(this).find('div.ss-left')
								   .css({ left   : '0%' })
								   .end()
								   .find('div.ss-right')
								   .css({ right  : '0%' })
								   .end()
								   .find('a.ss-circle')
								   .addClass('ss-circle-deco');
						});
					},
					// when scrolling the page change the position of each row	
					'scroll.Scrolling' : function( event ) {
						// set a timeout to avoid that the 
						// placeRows function gets called on every scroll trigger
						if( anim ) return false;
						anim = true;
						setTimeout( function() {
							placeRows();
							anim = false;
						}, 10 );
					}
				});
			},
			// sets the position of the rows (left and right row elements).
			// Both of these elements will start with -50% for the left/right (not visible)
			// and this value should be 0% (final position) when the element is on the
			// center of the window.
			placeRows		= function() {
					// how much we scrolled so far
				var winscroll	= $win.scrollTop(),
					// the y value for the center of the screen
					winCenter	= winSize.height / 2 + winscroll;
				// for every row that is not inviewport
				$rowsOutViewport.each( function(i) {
					var $row	= $(this),
						// the left side element
						$rowL	= $row.find('div.ss-left'),
						// the right side element
						$rowR	= $row.find('div.ss-right'),
						// top value
						rowT	= $row.offset().top;
					// hide the row if it is under the viewport
					if( rowT > winSize.height + winscroll ) {
						if( perspective ) {
							$rowL.css({
								'-webkit-transform'	: 'translate3d(-75%, 0, 0) rotateY(-90deg) translate3d(-75%, 0, 0)',
								'opacity'			: 0
							});
							$rowR.css({
								'-webkit-transform'	: 'translate3d(75%, 0, 0) rotateY(90deg) translate3d(75%, 0, 0)',
								'opacity'			: 0
							});
						}
						else {
							$rowL.css({ left 		: '-50%' });
							$rowR.css({ right 		: '-50%' });
						}
					}
					// if not, the row should become visible (0% of left/right) as it gets closer to the center of the screen.
					else {
							// row's height
						var rowH	= $row.height(),
							// the value on each scrolling step will be proporcional to the distance from the center of the screen to its height
							factor 	= ( ( ( rowT + rowH / 2 ) - winCenter ) / ( winSize.height / 2 + rowH / 2 ) ),
							// value for the left / right of each side of the row.
							// 0% is the limit
							val		= Math.max( factor * 50, 0 );
						if( val <= 0 ) {
							// when 0% is reached show the pointer for that row
							if( !$row.data('pointer') ) {
								$row.data( 'pointer', true );
								$row.find('.ss-circle').addClass('ss-circle-deco');
							}
						}
						else {
							// the pointer should not be shown
							if( $row.data('pointer') ) {
								$row.data( 'pointer', false );
								$row.find('.ss-circle').removeClass('ss-circle-deco');
							}
						}
						// set calculated values
						if( perspective ) {
							var	t		= Math.max( factor * 75, 0 ),
								r		= Math.max( factor * 90, 0 ),
								o		= Math.min( Math.abs( factor - 1 ), 1 );
							$rowL.css({
								'-webkit-transform'	: 'translate3d(-' + t + '%, 0, 0) rotateY(-' + r + 'deg) translate3d(-' + t + '%, 0, 0)',
								'opacity'			: o
							});
							$rowR.css({
								'-webkit-transform'	: 'translate3d(' + t + '%, 0, 0) rotateY(' + r + 'deg) translate3d(' + t + '%, 0, 0)',
								'opacity'			: o
							});
						}
						else {
							$rowL.css({ left 	: - val + '%' });
							$rowR.css({ right 	: - val + '%' });
						}
					}	
				});
			};
		return { init : init };
	})();
	$sidescroll.init();
});
</script>



用戶評論
大牛,別默默的看了,快登錄幫我點評一下吧!:)      登錄 | 注冊


熱門標簽: 滑動 滑塊 滑動門 觸屏滑動 滑動插件 滑塊插件 加載動畫 h5彈窗動畫 html5彈窗動畫 切換按鈕 日期時間 時鐘 日歷 時間 日歷插件 時間日期插件 h5動畫 h5背景動畫 h5場景動畫 h53D動畫 h5界面動畫 html5動畫 表單 表單美化 表單插件 表單美化插件 h5按鈕動畫 html5按鈕動畫 時間軸 豎直時間軸 橫向時間軸 h5動畫導航 h5動畫菜單 html5動畫導航 html5動畫菜單 滑動選項卡 滑動切換 按鈕控制
?
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

jQuery/js討論群
群號:642649996
Css3+Html5討論群
群號:322131262

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

湖北30选5开奖结果走势图表