利用jquery实现键盘按键切换效果



53 209 70



特效描述:利用jquery实现 键盘按键 切换效果,利用jquery实现键盘按键切换效果

代码结构

1. 引入CSS

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

2. 引入JS

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="keypress_nav.js"></script>

3. HTML代码

		<div id="header">
			<h1>jQuery Keypress Navigation</h1>
			<ul id="navigation">
				<li><a href="#home">Home ( a )</a></li>
				<li><a href="#about">About ( s )</a></li>
				<li><a href="#contact">Contact ( d )</a></li>
				<li><a href="#awards">Awards ( f )</a></li>
				<li><a href="#links">Links ( g )</a></li>
			</ul>
		</div>
		<div id="home" class="container">
			<h2>Welcome!</h2>
			<p>Thanks for taking the time to visit my site, it is greatly appreciated. Navigate this page by either clicking on the links provided above or by pressing any of the keys in parenthesis.</p>
		</div>
		<div id="about" class="container">
			<h2>About Me</h2>
			<p>My name is Bedrich Rios and I design web sites. In fact, I have been doing so for about 2 years now at Carleton College and as a freelancer. Web design is more than just another job, is more than hobby, it's my passion. Currently I'm accepting freelance jobs, so feel free to contact me.</p>
		</div>
		<div id="contact" class="container">
			<h2>No Spam Please</h2>
			<p>Gifts? Job offers? Compliments? They are all welcome.</p>
		</div>
		<div id="awards" class="container">
			<h2>Awards, So Many ...</h2>
			<p>If I was to count all of them, we would be here for quite a while. I wish.</p>
		</div>
		<div id="links" class="container">
			<h2>Cool Sites</h2>
			<p>Make sure you pay a visit to these sites:</p>
		</div>
		<div id="footer">
		</div>
<div style="text-align:center;clear:both">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册
小小的太阳
关注
TA的相关作品 >>更多
热搜关键词


热门标签: 滑动导航菜单 导航切换 滑动选项卡切换 图片滑动 图片切换 文字滑动 文字切换 滑动手风琴 背景切换 滑动星星打分 手风琴 选项卡自动切换 视频切换 列表切换 渐隐切换 全屏切换 切换按钮 缩放切换 滑动滑过 滚动切换 滑动选项卡切换 选项卡切换 滑动手风琴

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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