基于CSS3实现动画内容标签切换特效



69 274 92



特效描述:基于CSS3实现 动画内容标签 切换特效,基于CSS3实现动画内容标签切换特效

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300,300italic' rel='stylesheet' type='text/css'>

2. 引入JS

<script type="text/javascript" src="js/modernizr.custom.04022.js"></script>

3. HTML代码

        <div class="container">
			<header>
				<h1>Animated Content Tabs <span>with CSS3</span></h1>
				<h2>Content tabs using CSS3 transitions, animations and :checked 
				pseudo-class</h2>
				<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>
			</header>
			<section class="tabs">
	            <input id="tab-1" type="radio" name="radio-set" class="tab-selector-1" checked="checked" />
		        <label for="tab-1" class="tab-label-1">About</label>
	            <input id="tab-2" type="radio" name="radio-set" class="tab-selector-2" />
		        <label for="tab-2" class="tab-label-2">Services</label>
	            <input id="tab-3" type="radio" name="radio-set" class="tab-selector-3" />
		        <label for="tab-3" class="tab-label-3">Work</label>
	            <input id="tab-4" type="radio" name="radio-set" class="tab-selector-4" />
		        <label for="tab-4" class="tab-label-4">Contact</label>
			    <div class="clear-shadow"></div>
		        <div class="content">
			        <div class="content-1">
						<h2>About us</h2>
                        <p>You think water moves fast? You should see ice. It 
						moves like it has a mind. Like it knows it killed the 
						world once and got a taste for murder. After the 
						avalanche, it took us a week to climb out. Now, I don&#39;t 
						know exactly when we turned on each other, but I know 
						that seven of us survived the slide... and only five 
						made it out. Now we took an oath, that I&#39;m breaking now. 
						We said we&#39;d say it was the snow that killed the other 
						two, but it wasn&#39;t. Nature is lethal but it doesn&#39;t hold 
						a candle to man.</p>
						<h3>How we work</h3>
						<p>Like you, I used to think the world was this great 
						place where everybody lived by the same standards I did, 
						then some kid with a nail showed me I was living in his 
						world, a world where chaos rules not order, a world 
						where righteousness is not rewarded. That&#39;s Cesar&#39;s 
						world, and if you&#39;re not willing to play by his rules, 
						then you&#39;re gonna have to pay the price. </p>
				    </div>
			        <div class="content-2">
						<h2>Services</h2>
                        <p>Do you see any Teletubbies in here? Do you see a 
						slender plastic tag clipped to my shirt with my name 
						printed on it? Do you see a little Asian child with a 
						blank expression on his face sitting outside on a 
						mechanical helicopter that shakes when you put quarters 
						in it? No? Well, that&#39;s what you see at a toy store. And 
						you must think you&#39;re in a toy store, because you&#39;re 
						here shopping for an infant named Jeb.</p>
						<h3>Excellence</h3>
						<p>Like you, I used to think the world was this great 
						place where everybody lived by the same standards I did, 
						then some kid with a nail showed me I was living in his 
						world, a world where chaos rules not order, a world 
						where righteousness is not rewarded. That&#39;s Cesar&#39;s 
						world, and if you&#39;re not willing to play by his rules, 
						then you&#39;re gonna have to pay the price. </p>
				    </div>
			        <div class="content-3">
						<h2>Portfolio</h2>
                        <p>The path of the righteous man is beset on all sides 
						by the iniquities of the selfish and the tyranny of evil 
						men. Blessed is he who, in the name of charity and good 
						will, shepherds the weak through the valley of darkness, 
						for he is truly his brother&#39;s keeper and the finder of 
						lost children. And I will strike down upon thee with 
						great vengeance and furious anger those who would 
						attempt to poison and destroy My brothers. And you will 
						know My name is the Lord when I lay My vengeance upon 
						thee.</p>
						<h3>Examples</h3>
						<p>Now that we know who you are, I know who I am. I&#39;m 
						not a mistake! It all makes sense! In a comic, you know 
						how you can tell who the arch-villain&#39;s going to be? 
						He&#39;s the exact opposite of the hero. And most times 
						they&#39;re friends, like you and me! I should&#39;ve known way 
						back when... You know why, David? Because of the kids. 
						They called me Mr Glass. </p>
				    </div>
				    <div class="content-4">
						<h2>Contact</h2>
                        <p>You see? It&#39;s curious. Ted did figure it out - time 
						travel. And when we get back, we gonna tell everyone. 
						How it&#39;s possible, how it&#39;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 &#39;unknown entry event&#39;? Why don&#39;t they know? 
						If they don&#39;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>
						<h3>Get in touch</h3>
						<p>Well, the way they make shows is, they make one show. 
						That show&#39;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&#39;re going to make more 
						shows. Some pilots get picked and become television 
						programs. Some don&#39;t, become nothing. She starred in one 
						of the ones that became nothing. </p>
				    </div>
		        </div>
			</section>
        </div>
        <div style="text-align:center;clear:both">
</div>



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


热门标签: 文字叠加 滚动切换 滑动选项卡切换 文字拖动 文字提示框 文字收缩展开 文字放大缩小 文字翻转旋转 文字淡出淡进 文字全屏 文字延迟加载 360全景 html5文字动画 文字滚动 文字滑动 文字切换 选项卡切换 滑动手风琴 滑动星星打分 图片文字 文字导航菜单 文字 其他更多 导航切换 文字标签 文字切换 鼠标滑过

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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