html5 3D效果手機電腦里面滑動3D幻燈片輪播代碼



82 325 109



特效描述:html5 3D效果 手機電腦里面 滑動3D幻燈片輪播,3D幻燈片輪播代碼

代碼結構

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/mockup1.css" />
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/mockup1.css" />

2. 引入JS

<script src="js/modernizr.custom.js"></script>
<script src="js/classie.js"></script>
<script src="js/main.js"></script>
<script src="js/modernizr.custom.js"></script>
<script src="js/classie.js"></script>
<script src="js/main.js"></script>

3. HTML代碼

<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Perspective Mockup Slideshow | Demo 1</title>
<!--必要樣式-->
</head>
<body class="demo-1">
<div class="container">
	<div id="wrap" class="wrap">
		<div class="mockup">
			<img class="mockup__img" src="img/mockup.jpg" />
			<div id="mobile" class="mobile">
				<ul id="slideshow" class="slideshow">
					<li class="slideshow__item"><img src="img/small/1.png" /></li>
					<li class="slideshow__item"><img src="img/small/2.png" /></li>
					<li class="slideshow__item"><img src="img/small/3.png" /></li>
					<li class="slideshow__item"><img src="img/small/4.png" /></li>
				</ul>
			</div>
		</div>
	</div>
	<div class="content">
		<nav class="codrops-demos">
			<a class="current-demo" href="index.html">Demo 1</a>
			<a href="index2.html">Demo 2</a>
			<a href="index3.html">Demo 3</a>
			<a href="index4.html">Demo 4</a>
		</nav>
	</div>
</div><!-- /container -->
<script>
(function() {
	new Slideshow( document.getElementById( 'slideshow' ) );
	/* Mockup responsiveness */
	var body = docElem = window.document.documentElement,
		wrap = document.getElementById( 'wrap' ),
		mockup = wrap.querySelector( '.mockup' ),
		mockupWidth = mockup.offsetWidth;
	scaleMockup();
	function scaleMockup() {
		var wrapWidth = wrap.offsetWidth,
			val = wrapWidth / mockupWidth;
		mockup.style.transform = 'scale3d(' + val + ', ' + val + ', 1)';
	}
	window.addEventListener( 'resize', resizeHandler );
	function resizeHandler() {
		function delayed() {
			resize();
			resizeTimeout = null;
		}
		if ( typeof resizeTimeout != 'undefined' ) {
			clearTimeout( resizeTimeout );
		}
		resizeTimeout = setTimeout( delayed, 50 );
	}
	function resize() {
		scaleMockup();
	}
})();
</script>
</body>
</html>



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


熱門標簽: 滑動 滑塊 滑動門 觸屏滑動 滑動插件 滑塊插件 滾動切換 滾動條切換 滑動選項卡 滑動切換 flash焦點圖 flash幻燈片 flashbanner flash圖片輪播 選項卡切換 選項卡 切換 tab切換 頁面切換 選項卡插件 切換插件 滑動手風琴 焦點圖 幻燈片 輪播圖 bar焦點圖 圖片滑動 圖片滑塊 圖片切換 圖片選項卡 圖標選項卡 純圖片輪播 圖片輪播
?
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

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

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

老夫子电子