html5仿谷歌Material Design侧边导航点击切换选项代码



135 537 180



特效描述:html5仿谷歌 Material Design 侧边导航 切换选项代码,html5侧边导航,点击切换选项,谷歌Material Design

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/default.css">
<link href='http://fonts.useso.com/css?family=Lato:300,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/styles.css">

2. 引入JS

<script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>

3. HTML代码

<div class="com">
	<div class="com__content">
		<section class="com__section com__section--text">
			<p class="animate slideInLeft delay-3">适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗. 不支持IE8及以下浏览器。</p>
			<p>来源:<a href="http://www.51qianduan.com/" target="_blank"</a></p>
		</section>
		<section class="com__section com__section--text com__section--text-img">
			<div class="com__section-half">
				<h1 class="animate slideInLeft">Communication Design</h1>
				<p class="animate slideInLeft delay-2">Communication design is a mixed discipline between design and information-development which is concerned with how media intermission such as printed, crafted, electronic media or presentations communicate with people.</p>
			</div>
			<div class="com__section-half">
				<img class="animate slideInRight delay-3" src="world.svg" alt="" />
			</div>
		</section>
		<section class="com__section com__section--text centered">
			<h1 class="animate scaleIn"></h1>
			<img class="animate scaleIn delay-3" src="world.svg" alt="" />
		</section>
		<section class="com__section com__section--text">
			<h1 class="animate slideInLeft ">Communication Design</h1>
			<p class="animate slideInLeft delay-3">Communication design is a mixed discipline between design and information-development which is concerned with how media intermission such as printed, crafted, electronic media or presentations communicate with people.</p>
		</section>
		<section class="com__section com__section--text com__section--text-img">
			<div class="com__section-half">
				<h1 class="animate slideInLeft">Communication Design</h1>
				<p class="animate slideInLeft delay-2">Communication design is a mixed discipline between design and information-development which is concerned with how media intermission such as printed, crafted, electronic media or presentations communicate with people.</p>
			</div>
			<div class="com__section-half">
				<img class="animate slideInRight delay-3" src="world.svg" alt="" />
			</div>
		</section>
		<section class="com__section com__section--text centered">
			<h1 class="animate scaleIn">Communication Design</h1>
			<img class="animate scaleIn delay-3" src="world.svg" alt="" />
		</section>
		<section class="com__section com__section--text">
			<h1 class="animate slideInLeft ">Communication Design</h1>
			<p class="animate slideInLeft delay-3">Communication design is a mixed discipline between design and information-development which is concerned with how media intermission such as printed, crafted, electronic media or presentations communicate with people.</p>
		</section>
	</div>
	<nav class="com__nav">
		<ul class="com__nav-list">
			<li class="com__nav-item">
				<a href="" class="com__nav-link">
					<span class="blue-line animate scaleInLeft delay-2"></span>
					<span class="white-line animate scaleInLeft delay-4"></span>
					<span class="white-line animate scaleInLeft delay-5"></span>
				</a>
			</li>
			<li class="com__nav-item">
				<a href="" class="com__nav-link flex-row">
					<div class="com__section-half">
						<span class="blue-line animate scaleInLeft delay-3"></span>
						<span class="white-line animate scaleInLeft delay-4"></span>
					</div>
					<div class="com__section-half">
						<span class="white-circle animate slideInRight delay-5"></span>
					</div>
				</a>
			</li>
			<li class="com__nav-item">
				<a href="" class="com__nav-link centered">
					<span class="blue-line animate scaleIn delay-3"></span>
					<span class="white-circle animate scaleIn delay-5"></span>
				</a>
			</li>
			<li class="com__nav-item">
				<a href="" class="com__nav-link">
					<span class="blue-line animate scaleInLeft delay-2"></span>
					<span class="white-line animate scaleInLeft delay-4"></span>
					<span class="white-line animate scaleInLeft delay-5"></span>
				</a>
			</li>
			<li class="com__nav-item">
				<a href="" class="com__nav-link flex-row">
					<div class="com__section-half">
						<span class="blue-line animate scaleInLeft delay-3"></span>
						<span class="white-line animate scaleInLeft delay-4"></span>
					</div>
					<div class="com__section-half">
						<span class="white-circle animate slideInRight delay-5"></span>
					</div>
				</a>
			</li>
			<li class="com__nav-item">
				<a href="" class="com__nav-link centered">
					<span class="blue-line animate scaleIn delay-3"></span>
					<span class="white-circle animate scaleIn delay-5"></span>
				</a>
			</li>
			<li class="com__nav-item">
				<a href="" class="com__nav-link">
					<span class="blue-line animate scaleInLeft delay-2"></span>
					<span class="white-line animate scaleInLeft delay-4"></span>
					<span class="white-line animate scaleInLeft delay-5"></span>
				</a>
			</li>
		</ul>
	</nav>
</div>
<script type="text/javascript">
var link = $('.com__nav-link');
var linkParent = link.parent('li');
var section = $('.com__section');
var sectionContent = section.find('*');
var switchTab = function () {
	var p = $(this).parent('li');
	var i = p.index();
	var s = section.eq(i);
	var c = s.find('*');
	section.removeClass('active');
	sectionContent.removeAttr('style');
	s.addClass('active');
	c.css({
		transform: 'none',
		opacity: 1
	});
	linkParent.removeClass('active');
	p.addClass('active');
	return false;
};
link.on('click', switchTab);
function activeFirst() {
	section.first().addClass('active');
	section.first().find('*').css({
		transform: 'none',
		opacity: 1
	});
	linkParent.first().addClass('active');
}
activeFirst();
</script>



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


热门标签: 滑动导航菜单 导航切换 二级导航菜单 滑动选项卡切换 下拉导航菜单 图片滑动 图片切换 竖直导航菜单 文字滑动 文字切换 图标导航菜单 滑动手风琴 背景切换 固定导航菜单 滑动星星打分 手风琴 侧边导航菜单 选项卡自动切换 树形导航菜单 视频切换 网址导航菜单 列表切换 导航菜单插件 渐隐切换 文字导航菜单 全屏切换 切换按钮 缩放切换 滚动导航菜单 滑动导航菜单 浮动导航菜单 导航切换 右键菜单 收缩导航菜单 html5动画导航菜单 flash导航菜单 滑动滑过 滚动切换 滑动选项卡切换 选项卡切换 滑动手风琴 导航菜单导航条

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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