<?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>网站前端,web前端,前端脚本,前端优化&#124;时代前端 &#187; 导航</title>
	<atom:link href="http://www.52shidai.com/tag/%e5%af%bc%e8%88%aa/feed" rel="self" type="application/rss+xml" />
	<link>http://www.52shidai.com</link>
	<description>网站前端研究中心</description>
	<lastBuildDate>Thu, 02 Feb 2012 03:36:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>非常经典动画导航菜单效果代码</title>
		<link>http://www.52shidai.com/javascript/jquery/333.html</link>
		<comments>http://www.52shidai.com/javascript/jquery/333.html#comments</comments>
		<pubDate>Wed, 31 Mar 2010 02:39:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[导航]]></category>
		<category><![CDATA[经典]]></category>
		<category><![CDATA[菜单]]></category>

		<guid isPermaLink="false">http://www.52shidai.com/?p=333</guid>
		<description><![CDATA[JS·经典·炫彩菜单(动画效果) for jquery 样式 导航背景自己可以随意设计，不过本身这个颜色也是很漂亮的。 &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62; &#60;title&#62;Jquery·经典·菜单 &#124; 时代前端&#60;/title&#62; &#60;link type=&#34;text/css&#34; rel=&#34;Stylesheet&#34; href=&#34;css/style.css&#34; /&#62; &#60;script type='text/javascript' src='http://demo.jb51.net/js/caidan/js/jq.min.js'&#62;&#60;/script&#62; &#60;style type=&#34;text/css&#34;&#62; body { font-size:12px; } .menuBox { width:50%; height:auto; margin:0 auto; } .menuBox ul { margin:0px; padding:0px; } .menuBox ul li { [...]]]></description>
			<content:encoded><![CDATA[<p>JS·<span class='wp_keywordlink_affiliate'><a href="http://www.52shidai.com/tag/%e7%bb%8f%e5%85%b8" title="查看 经典 中的全部文章" target="_blank">经典</a></span>·炫彩<span class='wp_keywordlink_affiliate'><a href="http://www.52shidai.com/tag/%e8%8f%9c%e5%8d%95" title="查看 菜单 中的全部文章" target="_blank">菜单</a></span>(动画效果) for jquery<br />
样式 <span class='wp_keywordlink_affiliate'><a href="http://www.52shidai.com/tag/%e5%af%bc%e8%88%aa" title="查看 导航 中的全部文章" target="_blank">导航</a></span>背景自己可以随意设计，不过本身这个颜色也是很漂亮的。</p>
<div class="runcode">
<p><textarea name="runcode" style="height:500px;width:620px;font-size:12px" class="runcode_text" id="runcode_OhEI9b">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
    &lt;title&gt;Jquery·经典·菜单 | 时代前端&lt;/title&gt;
    &lt;link type=&quot;text/css&quot; rel=&quot;Stylesheet&quot; href=&quot;css/style.css&quot; /&gt;
    &lt;script type='text/javascript' src='http://demo.jb51.net/js/caidan/js/jq.min.js'&gt;&lt;/script&gt;
    &lt;style type=&quot;text/css&quot;&gt;
body
{
font-size:12px;
}
.menuBox
{
width:50%;
height:auto;
margin:0 auto;
}
.menuBox ul
{
margin:0px;
padding:0px;
}
.menuBox ul li
{
float:left;
display:block;
width:18%;
height:30px;
line-height:25px;
list-style:none;
margin-right:1px;
}
.menuBox ul li a
{
display:block;
width:100%;
height:100%;
background-color:Black;
color:White;
text-decoration:none;
text-align:center;
}
.menuBox ul li a:hover
{
display:block;
width:100%;
height:100%;
background-color:Silver;
color:Red;
text-decoration:none;
}
.menuSelected
{
display:block;
width:100%;
height:100%;
background-color:Silver;
color:Red;
text-decoration:none;
}
.chideMenuForShow
{
width:200px;
position:absolute;
height:auto;
border:1px solid #ccc;
float:right;
background-color:Silver;
}
	&lt;/style&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
	/*
 menu for javascript
 author:mr·zhong
 date:2010-01-25
*/
/*判断当前子菜单显示或隐藏*/
var MenuShowOrHide = false;
$(function(){
    SetMenuID();
    BindMenuHoverEval();
    BindChideMenuHoverEval();
});
/*
 设置主、子菜单按钮ID
*/
function SetMenuID(){
    var id = 1;
    $('#ul_menu a').each(function(){
        $(this).attr(&quot;id&quot;,&quot;a_&quot; + id);
        var chideObj = $(this).next();
        chideObj.attr(&quot;id&quot;,&quot;ChideMenu_a_&quot; + id);
        chideObj.hide();
         id++;
    });
}
/*
 设置菜单颜色样式
*/
function SetMenuColor(menuID,isSelected){
    if(isSelected) $(&quot;#&quot; + menuID).addClass(&quot;menuSelected&quot;);
    else $(&quot;#&quot; + menuID).removeClass(&quot;menuSelected&quot;);
}
/*
 设置子菜单显示或隐藏
*/
function ShowOrHideChideMenu(menuID,isShow){
    var obj = $(&quot;#&quot; + menuID);
    if(isShow)
    {
        obj.slideDown(&quot;slow&quot;);
    }
    else obj.hide(&quot;slow&quot;);
}
/*
 绑定主菜单鼠标事件
*/
function BindMenuHoverEval(){
    $(&quot;#ul_menu a&quot;).each(function(){
       $(this).hover(function(){
            ShowOrHideChideMenu(&quot;ChideMenu_&quot; + $(this).attr(&quot;id&quot;),true);
            MenuShowOrHide = true;
       },function(){
            setTimeout('Hide(ChideMenu_' + $(this).attr(&quot;id&quot;) +')',500);
       });
    });
}
/*
 绑定子菜单鼠标事件
*/
function BindChideMenuHoverEval(){
    $(&quot;#ul_menu .chideMenuForShow&quot;).each(function(){
       $(this).hover(function(){
            MenuShowOrHide = true;
       },function(){
            MenuShowOrHide = false;
            Hide($(this).attr(&quot;id&quot;));
       });
    });
}
/*
 隐藏子菜单
*/
function Hide(id){
    if(!MenuShowOrHide) ShowOrHideChideMenu(id,false);
}
	&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class='menuBox'&gt;
        &lt;ul id='ul_menu'&gt;
            &lt;li&gt;
                &lt;a href='#'&gt;menu1&lt;/a&gt;
                &lt;div class=&quot;chideMenuForShow&quot;&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                    &lt;div&gt;menu1&lt;/div&gt;
                &lt;/div&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href='#'&gt;menu2&lt;/a&gt;
                &lt;div class=&quot;chideMenuForShow&quot;&gt;
                    &lt;div&gt;menu2&lt;/div&gt;
                    &lt;div&gt;menu2&lt;/div&gt;
                    &lt;div&gt;menu2&lt;/div&gt;
                    &lt;div&gt;menu2&lt;/div&gt;
                    &lt;div&gt;menu2&lt;/div&gt;
                    &lt;div&gt;menu2&lt;/div&gt;
                &lt;/div&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href='#'&gt;menu3&lt;/a&gt;
                &lt;div class=&quot;chideMenuForShow&quot;&gt;
                    &lt;div&gt;menu3&lt;/div&gt;
                    &lt;div&gt;menu3&lt;/div&gt;
                    &lt;div&gt;menu3&lt;/div&gt;
                    &lt;div&gt;menu3&lt;/div&gt;
                    &lt;div&gt;menu3&lt;/div&gt;
                &lt;/div&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href='#'&gt;menu4&lt;/a&gt;
                &lt;div class=&quot;chideMenuForShow&quot;&gt;
                    &lt;div&gt;menu4&lt;/div&gt;
                    &lt;div&gt;menu4&lt;/div&gt;
                    &lt;div&gt;menu4&lt;/div&gt;
                    &lt;div&gt;menu4&lt;/div&gt;
                    &lt;div&gt;menu4&lt;/div&gt;
                    &lt;div&gt;menu4&lt;/div&gt;
                &lt;/div&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href='#'&gt;menu5&lt;/a&gt;
                &lt;div class=&quot;chideMenuForShow&quot;&gt;
                    &lt;div&gt;menu5&lt;/div&gt;
                    &lt;div&gt;menu5&lt;/div&gt;
                    &lt;div&gt;menu5&lt;/div&gt;
                    &lt;div&gt;menu5&lt;/div&gt;
                    &lt;div&gt;menu5&lt;/div&gt;
                    &lt;div&gt;menu5&lt;/div&gt;
                &lt;/div&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.52shidai.com&quot;&gt;时代前端&lt;/a&gt;整理&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_OhEI9b');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_OhEI9b');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_OhEI9b','runcode_OhEI9b');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<h2  class="related_post_title">您可能感兴趣的文章</h2><ul class="related_post"><li><a href="http://www.52shidai.com/javascript/jquery/83.html" title="jquery 经典动画菜单效果">jquery 经典动画菜单效果</a></li><li><a href="http://www.52shidai.com/javascript/jquery/832.html" title="Path的Menu菜单（加号）效果">Path的Menu菜单（加号）效果</a></li><li><a href="http://www.52shidai.com/seo/170.html" title="学习SEO(搜索引擎优化)必须要看的15个经典效应">学习SEO(搜索引擎优化)必须要看的15个经典效应</a></li><li><a href="http://www.52shidai.com/javascript/jquery/142.html" title="一些流行的前端的应用导航（Jquery下制作）">一些流行的前端的应用导航（Jquery下制作）</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.52shidai.com/javascript/jquery/333.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一些流行的前端的应用导航（Jquery下制作）</title>
		<link>http://www.52shidai.com/javascript/jquery/142.html</link>
		<comments>http://www.52shidai.com/javascript/jquery/142.html#comments</comments>
		<pubDate>Mon, 22 Feb 2010 03:02:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[导航]]></category>
		<category><![CDATA[流行]]></category>

		<guid isPermaLink="false">http://52shidai.com/?p=142</guid>
		<description><![CDATA[其实不用jquery也可以很好的完成以下任务，因为以下很多实例都是用的Dojo或者mootools开发出来的。 先看看这些应用的体现： 这个导航看起来最开始我觉得很简单，CSS就可以彻底实现，但是考虑到IE6的不支持伪类，还是用JS来做了，而且相对于2个层错位覆盖的效果来看，用JS更稳定些。 *{font-family:Arial; font-size:12px; padding:0px;} ul{list-style:none;}&#60;/pre&#62; /*demo1*/ #demo1{ width:300px; height:25px; background:#D2DA9E; border:#333 solid 1px; } #demo1 li{ float:left; display:inline-block; margin-left:10px; line-height:25px; text-align:center; width:78px; height:25px; position:relative; z-index:1; } #demo1 a{color:#333;} .a_move{ background:url(demo/demo1.gif) no-repeat center top; width:78px; height:25px; position:absolute; left:0px; top:-12px; z-index:-1; } 这个是我做的DEMO中的样式结构，组合起来看，好的CSS和HTML结构对你的页面是多么的重要。 HTML部分很简单. &#60;ul id=”demo1&#8243;&#62;        &#60;li&#62;&#60;a href=”#”&#62;Home&#60;/a&#62;&#60;/li&#62;        &#60;li&#62;&#60;a [...]]]></description>
			<content:encoded><![CDATA[<p>其实不用jquery也可以很好的完成以下任务，因为以下很多实例都是用的Dojo或者mootools开发出来的。</p>
<p>先看看这些应用的体现：</p>
<p><img src="http://www.designsor.com/wp-content/uploads/2010/02/animated-navigation-menu.jpg" border="0" alt="" /></p>
<p>这个<span class='wp_keywordlink_affiliate'><a href="http://www.52shidai.com/tag/%e5%af%bc%e8%88%aa" title="查看 导航 中的全部文章" target="_blank">导航</a></span>看起来最开始我觉得很简单，CSS就可以彻底实现，但是考虑到IE6的不支持伪类，还是用JS来做了，而且相对于2个层错位覆盖的效果来看，用JS更稳定些。<br />
<span style="color: #2e8b57;">*{font-family:Arial; font-size:12px; padding:0px;}<br />
ul{list-style:none;}&lt;/pre&gt;<br />
/*demo1*/<br />
#demo1{<br />
width:300px;<br />
height:25px;<br />
background:#D2DA9E;<br />
border:#333 solid 1px;<br />
}<br />
#demo1 li{<br />
float:left;<br />
display:inline-block;<br />
margin-left:10px;<br />
line-height:25px;<br />
text-align:center;<br />
width:78px;<br />
height:25px;<br />
position:relative;<br />
z-index:1;<br />
}<br />
#demo1 a{color:#333;}<br />
.a_move{<br />
background:url(demo/demo1.gif) no-repeat center top;<br />
width:78px;<br />
height:25px;<br />
position:absolute;<br />
left:0px;<br />
top:-12px;<br />
z-index:-1;<br />
}</span><br />
这个是我做的DEMO中的样式结构，组合起来看，好的CSS和HTML结构对你的页面是多么的重要。<br />
HTML部分很简单.<br />
<span style="color: #2e8b57;">&lt;ul id=”demo1&#8243;&gt;<br />
       &lt;li&gt;&lt;a href=”#”&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
       &lt;li&gt;&lt;a href=”#”&gt;Google&lt;/a&gt;&lt;/li&gt;<br />
       &lt;li&gt;&lt;a href=”#”&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</span><br />
JS部分的结构如下：<br />
<span style="color: #ff8c00;">$(“#demo1&amp;gt;li”).hover(function(){<br />
$(this).append(”<br />
&lt;div&gt;”);<br />
},function(){<br />
$(“.a_move”).remove();<br />
});</span></p>
<p>以上代码只是片段帮助理解，具体代码可以查看最后我给出的DEMO地址中的源文件。</p>
<p>看似不难，但是真正写出来还是有点校技巧，主要是相对绝对定位的理解功力还有对DOM节点的把握。主要还是CSS的位置关系了解要很明朗才可以。</p>
<p>其他的一些例子：<br />
<img src="http://www.designsor.com/wp-content/uploads/2010/02/apple-old-lg.gif" border="0" alt="" /><br />
经典的苹果网站的<span class='wp_keywordlink_affiliate'><a href="http://www.52shidai.com/tag/%e5%af%bc%e8%88%aa" title="查看 导航 中的全部文章" target="_blank">导航</a></span>，它的源代码早早就研究过，不难，css sprites+JS的样式切换即可解决。</p>
<p><img src="http://www.designsor.com/wp-content/uploads/2010/02/minitask1.gif" border="0" alt="" /><br />
HTML可编辑的属性，知道的人不多，但是知道之后要学会控制它的样式，根据焦点的不同来设置，并需要提供一个HOVER的标示符来辅助操作。很简单，均可查看最后的源代码。</p>
<p><img src="http://www.designsor.com/wp-content/uploads/2010/02/minitask2.gif" border="0" alt="" /><br />
用一个一个alert()难道不厌烦了么？操作DOM节点来进行模拟confirm也不失是一种更好的选择。</p>
<p><img src="http://www.designsor.com/wp-content/uploads/2010/02/twitterhint1.gif" border="0" alt="" /><br />
这个原理很多了，我只是用了一个setTimeout配合一些动画即可完成，根本不需要一些复杂的扩展。</p>
<p><img src="http://www.designsor.com/wp-content/uploads/2010/02/input2.gif" border="0" alt="" /><br />
道理很简单，width,height随时间轴一样可以完成优雅的动画，而效果更具人性化。</p>
<h2  class="related_post_title">您可能感兴趣的文章</h2><ul class="related_post"><li><a href="http://www.52shidai.com/javascript/jquery/333.html" title="非常经典动画导航菜单效果代码">非常经典动画导航菜单效果代码</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.52shidai.com/javascript/jquery/142.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

