<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>chisdy.A.Pro &#187; Menu</title>
	<atom:link href="http://chisdy.com/tag/menu/feed/" rel="self" type="application/rss+xml" />
	<link>http://chisdy.com</link>
	<description>chisdy.A.Pro</description>
	<lastBuildDate>Mon, 03 May 2010 04:20:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://chisdy.com/wp-includes/js/jquery/jquery.js?ver=1.4.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>AutoSprites &#8211; jquery导航插件</title>
		<link>http://chisdy.com/autosprites-jquery-navigation-plugin/</link>
		<comments>http://chisdy.com/autosprites-jquery-navigation-plugin/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 15:00:11 +0000</pubDate>
		<dc:creator>chisdy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[Sprites]]></category>

		<guid isPermaLink="false">http://chisdy.com/autosprites-jquery-navigation-plug-in/</guid>
		<description><![CDATA[CSS Sprites相信大家都比较熟悉了，早在2005年CSS Zengarden的园主Dave Shea就在AListApart发表对该技术的详细阐述，也不算是新鲜事了。之前要应用时都为了算位而烦恼，好在目前多了很多在线生成工具，减少了些繁琐的过程，我也在打算下一步把目前这个theme所用到的图片妖一下，瘦下身，这是下一步的工作，这次先分享个jquery的AutoSprites导航插件，初步了解，效果还不错。 相应的图片弄好之后，接着就是html结构： &#60;ul id=&#34;hnav&#34;&#62; &#60;li id=&#34;hnavhome&#34;&#62;&#60;a href=&#34;#&#34;&#62;Home&#60;/a&#62;&#60;/li&#62; &#60;li id=&#34;hnavlocal&#34;&#62;&#60;a href=&#34;#&#34;&#62;Local Industry&#60;/a&#62;&#60;/li&#62; &#60;li id=&#34;hnavhigher&#34;&#62;&#60;a href=&#34;#&#34;&#62;Higher Education&#60;/a&#62;&#60;/li&#62; &#60;li id=&#34;hnavcomm&#34;&#62;&#60;a href=&#34;#&#34;&#62;Our Community&#60;/a&#62;&#60;/li&#62; &#60;li id=&#34;hnavnews&#34;&#62;&#60;a href=&#34;#&#34;&#62;News&#60;/a&#62;&#60;/li&#62; &#60;/ul&#62; 接着需要设置下css文件： #hnav &#123; position: absolute; top: 0; left: 0; width: 615px; height: 72px; background: url&#40;'horiz_sprites.gif'&#41; no-repeat; &#125; #hnav li &#123; position: absolute; left: 0; height: 72px; &#125; #hnav #hnavhome [...]]]></description>
			<content:encoded><![CDATA[<p>CSS Sprites相信大家都比较熟悉了，早在2005年<a href="http://csszengarden.com/">CSS Zengarden</a>的园主<a href="http://www.mezzoblue.com/">Dave Shea</a>就在<a href="http://www.alistapart.com/">AListApart</a>发表对该技术的<a href="http://www.alistapart.com/articles/sprites">详细阐述</a>，也不算是新鲜事了。之前要应用时都为了算位而烦恼，好在目前多了很多在线生成工具，减少了些繁琐的过程，我也在打算下一步把目前这个theme所用到的图片妖一下，瘦下身，这是下一步的工作，这次先分享个jquery的<a href="http://www.newmediacampaigns.com/page/autosprites-jquery-menu-plugin">AutoSprites导航插件</a>，初步了解，效果还不错。</p>
<p><img class="aligncenter size-full wp-image-202" title="horiz_sprites_post" src="http://chisdy.com/wp-content/uploads/2009/10/horiz_sprites_post.jpg" alt="horiz_sprites_post" width="560" height="131" /></p>
<p><strong>相应的图片弄好之后，接着就是html结构：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;hnav&quot;&gt;
	&lt;li id=&quot;hnavhome&quot;&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;hnavlocal&quot;&gt;&lt;a href=&quot;#&quot;&gt;Local Industry&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;hnavhigher&quot;&gt;&lt;a href=&quot;#&quot;&gt;Higher Education&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;hnavcomm&quot;&gt;&lt;a href=&quot;#&quot;&gt;Our Community&lt;/a&gt;&lt;/li&gt;
	&lt;li id=&quot;hnavnews&quot;&gt;&lt;a href=&quot;#&quot;&gt;News&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<p><span id="more-203"></span></p>
<p><strong>接着需要设置下css文件：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#hnav</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">615px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">72px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'horiz_sprites.gif'</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">72px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> <span style="color: #cc00cc;">#hnavhome</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">82px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> <span style="color: #cc00cc;">#hnavlocal</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">146px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">82px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> <span style="color: #cc00cc;">#hnavhigher</span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">162px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">228px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> <span style="color: #cc00cc;">#hnavcomm</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">143px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">390px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> <span style="color: #cc00cc;">#hnavnews</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">82px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">533px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#hnav</span> li a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">72px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9999em</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>接着只需设置下相应的参数就行了：</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#hnav'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">autosprites</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
offset<span style="color: #339933;">:</span> <span style="color: #3366CC;">'72px'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>其中的72px设置的是横向导航的高度，默认的是横向设置。偏移值设置，横向导航设置的offset值是其高度，纵向设置的是其宽度。还有些扩展设置：</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">settings <span style="color: #339933;">=</span> $.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
offset<span style="color: #339933;">:</span> <span style="color: #3366CC;">'100%'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">//偏移位置</span>
orientation<span style="color: #339933;">:</span> <span style="color: #3366CC;">'horizontal'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">//'vertical' 为纵向导航</span>
over<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> opacity<span style="color: #339933;">:</span> <span style="color: #3366CC;">'show'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
overSpeed<span style="color: #339933;">:</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">,</span>
out<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> opacity<span style="color: #339933;">:</span> <span style="color: #3366CC;">'hide'</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
outSpeed<span style="color: #339933;">:</span> <span style="color: #CC0000;">500</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> settings<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<div class="entryurl"><a href="http://www.newmediacampaigns.com/files/posts/autosprites/index.html">DEMO地址</a> <a href="http://www.newmediacampaigns.com/files/posts/autosprites/autosprites.zip">下载地址</a> <a href="http://www.newmediacampaigns.com/page/autosprites-jquery-menu-plugin">原文地址</a></div>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://chisdy.com/jquery-nav-menu/" title="基于jquery的一个横向导航菜单">基于jquery的一个横向导航菜单</a></li><li><a href="http://chisdy.com/need-to-review-the-position-of-the-css/" title="原来学东西真的需要复习之css的position">原来学东西真的需要复习之css的position</a></li><li><a href="http://chisdy.com/create-loading-bar-by-jquery/" title="基于jquery的载入提示">基于jquery的载入提示</a></li><li><a href="http://chisdy.com/that-is-a-joke/" title="这不就搞笑吗?">这不就搞笑吗?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chisdy.com/autosprites-jquery-navigation-plugin/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>基于jquery的一个横向导航菜单</title>
		<link>http://chisdy.com/jquery-nav-menu/</link>
		<comments>http://chisdy.com/jquery-nav-menu/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 14:14:12 +0000</pubDate>
		<dc:creator>chisdy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Menu]]></category>

		<guid isPermaLink="false">http://chisdy.com/?p=3</guid>
		<description><![CDATA[今天逛老外网站又发现了个基于jquery的横向导航菜单，感觉不错，以后估计用得上，就索性的抓了下来。 里面用到了Superfish这个插件，挺方便的。 预览地址：http://chisdy.com/demo/menu/jmenu/index.html Related PostsAutoSprites &#8211; jquery导航插件原来学东西真的需要复习之css的positionCSS3开发工具收集重温css表单设计分享3个站点基于jquery的载入提示IE浏览器各版本的CSS条件判断5种方法立刻写出更好的CSS代码CSS兼容方案的一些简便技巧ASP.NET2.0使用主题]]></description>
			<content:encoded><![CDATA[<p>今天逛老外网站又发现了个基于jquery的横向导航菜单，感觉不错，以后估计用得上，就索性的抓了下来。</p>
<p><a href="http://chisdy.com/demo/menu/jmenu/index.html"><img class="aligncenter size-full wp-image-4" title="jquery_menu" src="http://chisdy.com/wp-content/uploads/2009/02/jquery_menu.jpg" alt="jquery_menu" width="500" height="255" /></a></p>
<p>里面用到了<a href="http://plugins.jquery.com/project/Superfish">Superfish</a>这个插件，挺方便的。</p>
<p>预览地址：<a href="http://chisdy.com/demo/menu/jmenu/index.html">http://chisdy.com/demo/menu/jmenu/index.html</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://chisdy.com/autosprites-jquery-navigation-plugin/" title="AutoSprites &#8211; jquery导航插件">AutoSprites &#8211; jquery导航插件</a></li><li><a href="http://chisdy.com/need-to-review-the-position-of-the-css/" title="原来学东西真的需要复习之css的position">原来学东西真的需要复习之css的position</a></li><li><a href="http://chisdy.com/css3-development-tools-to-collect/" title="CSS3开发工具收集">CSS3开发工具收集</a></li><li><a href="http://chisdy.com/css-form-design-review/" title="重温css表单设计">重温css表单设计</a></li><li><a href="http://chisdy.com/three-sites-to-share/" title="分享3个站点">分享3个站点</a></li><li><a href="http://chisdy.com/create-loading-bar-by-jquery/" title="基于jquery的载入提示">基于jquery的载入提示</a></li><li><a href="http://chisdy.com/css-if-for-ie/" title="IE浏览器各版本的CSS条件判断">IE浏览器各版本的CSS条件判断</a></li><li><a href="http://chisdy.com/5-tips-to-writing-better-css/" title="5种方法立刻写出更好的CSS代码">5种方法立刻写出更好的CSS代码</a></li><li><a href="http://chisdy.com/css-compatible-program-some-simple-techniques/" title="CSS兼容方案的一些简便技巧">CSS兼容方案的一些简便技巧</a></li><li><a href="http://chisdy.com/asp-net-2-the-use-of-the-theme/" title="ASP.NET2.0使用主题">ASP.NET2.0使用主题</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://chisdy.com/jquery-nav-menu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
