利用CSS3实现图片导航效果



40 157 53



特效描述:利用CSS3实现 图片导航效果,利用CSS3实现图片导航效果

代码结构

1. 引入CSS

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

2. HTML代码

        <div class="container">
			<!-- Codrops top bar -->
            <div class="codrops-top">
                <span class="right">
                </span>
                <div class="clr"></div>
            </div><!--/ Codrops top bar -->
			<header>
				<h1>Content Navigator <span>with CSS3</span></h1>
				<h2>Responsive content navigation using CSS3 transitions and :target pseudo-class</h2>
				<nav class="codrops-demos">
					<a class="current-demo" href="index.html#slide-main">Demo 1</a>
					<a href="index2.html#slide-main">Demo 2</a>
					<a href="index3.html#slide-main">Demo 3</a>
					<a href="index4.html#slide-main">Demo 4</a>
					<a href="index5.html#slide-main">Demo 5</a>
				</nav>
			</header>
			<!--[if lte IE 9]>
			<p style="font-size: 20px; padding: 50px;">Sorry, this only works in modern browsers...</p>
			<![endif]-->
			<section class="cn-container">
				<div class="cn-slide" id="slide-main">
					<h2>Explore this</h2>
					<nav>
						<a href="#slide-1">Philosphy</a>							
						<a href="#slide-2">Science</a>						
						<a href="#slide-3">Literature</a>
					</nav>
				</div>
				<!-- Slide 1 and Sub-slides -->
				<div class="cn-slide cn-slide-sub" id="slide-1">
					<h2>Philosophy</h2>
					<a href="#slide-main" class="cn-back">Back</a>
					<nav>
						<a href="#slide-1-1">Epistemology</a>							
						<a href="#slide-1-2">Metaphysics</a>
						<a href="#slide-1-3">Aesthetics</a>
						<a href="#slide-1-4">Ethics</a>
					</nav>
				</div>
				<div class="cn-slide" id="slide-1-1">
					<h2>Epistemology</h2>
					<a href="#slide-1" class="cn-back">Back</a>
					<div class="cn-content">
						<p>The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-1-2">
					<h2>Metaphysics</h2>
					<a href="#slide-1" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-1-3">
					<h2>Aesthetics</h2>
					<a href="#slide-1" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-1-4">
					<h2>Ethics</h2>
					<a href="#slide-1" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<!-- Slide 2 and Sub-slides -->
				<div class="cn-slide cn-slide-sub" id="slide-2">
					<h2>Science</h2>
					<a href="#slide-main" class="cn-back">Back</a>
					<nav>
						<a href="#slide-2-1">Physics</a>							
						<a href="#slide-2-2">Biology</a>
						<a href="#slide-2-3">Anthropology</a>
						<a href="#slide-2-4">Chemistry</a>
					</nav>
				</div>
				<div class="cn-slide" id="slide-2-1">
					<h2>Physics</h2>
					<a href="#slide-2" class="cn-back">Back</a>
					<div class="cn-content">
						<p>The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-2-2">
					<h2>Biology</h2>
					<a href="#slide-2" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-2-3">
					<h2>Anthropology</h2>
					<a href="#slide-2" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-2-4">
					<h2>Chemistry</h2>
					<a href="#slide-2" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<!-- Slide 3 and Sub-slides -->
				<div class="cn-slide cn-slide-sub" id="slide-3">
					<h2>Literature</h2>
					<a href="#slide-main" class="cn-back">Back</a>
					<nav>
						<a href="#slide-3-1">Poetry</a>							
						<a href="#slide-3-2">Prose</a>
						<a href="#slide-3-3">Fiction</a>
						<a href="#slide-3-4">Non-fiction</a>
					</nav>
				</div>
				<div class="cn-slide" id="slide-3-1">
					<h2>Poetry</h2>
					<a href="#slide-3" class="cn-back">Back</a>
					<div class="cn-content">
						<p>The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island. Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism. The animals can't manufacture the amino acid lysine. Unless they're continually supplied with lysine by us, they'll slip into a coma and die. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-3-2">
					<h2>Prose</h2>
					<a href="#slide-3" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-3-3">
					<h2>Fiction</h2>
					<a href="#slide-3" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
				<div class="cn-slide" id="slide-3-4">
					<h2>Non-fiction</h2>
					<a href="#slide-3" class="cn-back">Back</a>
					<div class="cn-content">
						<p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic. </p>
						<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p>
					</div>
					<span class="cn-note">Keep clicked to show image</span>
				</div>
			</section>
        </div>



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


热门标签: 滑动导航菜单 导航切换 图片淡出淡进 图片头像上传 滑动选项卡切换 文字淡出淡进 文件上传 图片滑动 图片切换 文本框 文字滑动 文字切换 下拉框 滑动手风琴 背景切换 复选 滑动星星打分 手风琴 单选 选项卡自动切换 登录框 视频切换 注册框 列表切换 搜索框 验证码 渐隐切换 二级联动 全屏切换 三级联动 切换按钮 城市选择 缩放切换 value赋值 筛选 按钮控制 购物车 颜色选择 表单提交 全选/反选 添加删除 添加标签 密码强度验证 表单验证 html5按钮动画 按钮样式 密码修改设置 滑动滑过 滚动切换 滑动选项卡切换 选项卡切换 滑动手风琴 渐隐切换 淡出淡入淡进 切换按钮 form表单

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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