利用jquery實現鍵盤按鍵切換效果



16 62 21



特效描述:利用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>



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


熱門標簽: 滑動 滑塊 滑動門 觸屏滑動 滑動插件 滑塊插件 滾動切換 滾動條切換 滑動選項卡 滑動切換 選項卡切換 選項卡 切換 tab切換 頁面切換 選項卡插件 切換插件 滑動手風琴 圖片滑動 圖片滑塊 圖片切換 圖片選項卡 圖標選項卡 文字切換 文字選項卡
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

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

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

老夫子电子