<?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>登高望远 &#187; css</title>
	<atom:link href="http://www.dengor.com/archives/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dengor.com</link>
	<description>努力往上  只为看得更远一点点......</description>
	<lastBuildDate>Mon, 06 Feb 2012 08:59:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>让superfish在IE6不被遮住</title>
		<link>http://www.dengor.com/archives/1084.html</link>
		<comments>http://www.dengor.com/archives/1084.html#comments</comments>
		<pubDate>Tue, 08 Feb 2011 14:08:06 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[superfish]]></category>
		<category><![CDATA[层]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1084</guid>
		<description><![CDATA[superfish是一个很好用的多级菜单js程序, 运用这个可以很容易做成级联菜单.  但是很在IE6下有个bug就是可能会被下面的层遮住弹出的菜单. IE6中会显示在最下面. 可以对菜单的li 加上 position 和 z-index来解决: #menu li {position:relative; z-index:99;} 对于IE6的层显示问题解决方法有三， 1、position:relative改为position:absolute； 2、去除浮动； 3、浮动元素添加position属性（如relative，absolute等） 相关文章Jquery实现同级元素区别对待解决IE6中Z-index无效不兼容问题用js解决广告代码载入慢的问题JavaScript字符处理函数Iframe之间传值和数据的方法CSS样式id和class属性优先级问题用CSS隐藏文字方法的比较用CSS强制改变链接的颜色如何写没有链接目标的超链接Kill IE 6]]></description>
			<content:encoded><![CDATA[<p>superfish是一个很好用的多级菜单js程序, 运用这个可以很容易做成级联菜单.  但是很在IE6下有个bug就是可能会被下面的层遮住弹出的菜单. IE6中会显示在最下面. 可以对菜单的li 加上 position 和 z-index来解决:</p>
<blockquote><p>#menu li {position:relative; z-index:99;}</p></blockquote>
<p>对于IE6的层显示问题解决方法有三，</p>
<p>1、position:relative改为position:absolute；</p>
<p>2、去除浮动；</p>
<p>3、浮动元素添加position属性（如relative，absolute等）</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/87.html" title="Jquery实现同级元素区别对待">Jquery实现同级元素区别对待</a></li><li><a href="http://www.dengor.com/archives/905.html" title="解决IE6中Z-index无效不兼容问题">解决IE6中Z-index无效不兼容问题</a></li><li><a href="http://www.dengor.com/archives/840.html" title="用js解决广告代码载入慢的问题">用js解决广告代码载入慢的问题</a></li><li><a href="http://www.dengor.com/archives/761.html" title="JavaScript字符处理函数">JavaScript字符处理函数</a></li><li><a href="http://www.dengor.com/archives/681.html" title="Iframe之间传值和数据的方法">Iframe之间传值和数据的方法</a></li><li><a href="http://www.dengor.com/archives/618.html" title="CSS样式id和class属性优先级问题">CSS样式id和class属性优先级问题</a></li><li><a href="http://www.dengor.com/archives/350.html" title="用CSS隐藏文字方法的比较">用CSS隐藏文字方法的比较</a></li><li><a href="http://www.dengor.com/archives/323.html" title="用CSS强制改变链接的颜色">用CSS强制改变链接的颜色</a></li><li><a href="http://www.dengor.com/archives/282.html" title="如何写没有链接目标的超链接">如何写没有链接目标的超链接</a></li><li><a href="http://www.dengor.com/archives/75.html" title="Kill IE 6">Kill IE 6</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1084.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS样式id和class属性优先级问题</title>
		<link>http://www.dengor.com/archives/618.html</link>
		<comments>http://www.dengor.com/archives/618.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 06:23:00 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[平面美化]]></category>
		<category><![CDATA[网站程序]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[优先级]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=618</guid>
		<description><![CDATA[&#160;&#160;&#160; 在DIV+CSS设计网页时, 总会碰到一些CSS属性优先级问题. 如果不清楚优先级的等级, 直接想当然的认为应该是这样, 就很容易出错.&#160; 这里分析一个本人碰到的问题, 学习一下属性优先级问题.&#160; &#160;&#160;&#160; 下面是代码测试代码: &#60;style type=&#34;text/css&#34;&#62; &#60;!&#8211; #div1 ul li{ list-style: square;} .div2class ul li{ list-style:none;} &#8211;&#62; &#60;/style&#62; &#60;div id=&#34;div1&#34; class=&#34;div1class&#34;&#62; &#160; &#60;div id=&#34;div2&#34; class=&#34;div2class&#34;&#62; &#160;&#160;&#160; &#60;ul&#62; &#160;&#160;&#160;&#160;&#160; &#60;li&#62;1&#60;/li&#62; &#160;&#160;&#160;&#160;&#160; &#60;li&#62;2&#60;/li&#62; &#160;&#160;&#160;&#160;&#160; &#60;li&#62;3&#60;/li&#62; &#160;&#160;&#160; &#60;/ul&#62; &#160; &#60;/div&#62; &#60;/div&#62; &#160;&#160;&#160;&#160; 上面代码本意是通过想通过div2class来去掉li前面定义的点, 按照越靠近优先级越高原则,&#160; 应该是应用&#160; .div2class&#160; 中的定义, 但实际情况方点并没有去掉.&#160;&#160; 并没有应用 .div2class 还是按照 #div1 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp; 在DIV+CSS设计网页时, 总会碰到一些CSS属性优先级问题. 如果不清楚优先级的等级, 直接想当然的认为应该是这样, 就很容易出错.&nbsp; 这里分析一个本人碰到的问题, 学习一下属性优先级问题.&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 下面是代码测试代码:</p>
<p><span id="more-618"></span></p>
<blockquote>
<p>&lt;style type=&quot;text/css&quot;&gt;<br />
		&lt;!&#8211;<br />
		#div1 ul li{ list-style: square;}<br />
		.div2class ul li{ list-style:none;}<br />
		&#8211;&gt;<br />
		&lt;/style&gt;<br />
		&lt;div id=&quot;div1&quot; class=&quot;div1class&quot;&gt;<br />
		&nbsp; &lt;div id=&quot;div2&quot; class=&quot;div2class&quot;&gt;<br />
		&nbsp;&nbsp;&nbsp; &lt;ul&gt;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;1&lt;/li&gt;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;2&lt;/li&gt;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;li&gt;3&lt;/li&gt;<br />
		&nbsp;&nbsp;&nbsp; &lt;/ul&gt;<br />
		&nbsp; &lt;/div&gt;<br />
		&lt;/div&gt;</p>
</blockquote>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 上面代码本意是通过想通过div2class来去掉li前面定义的点, 按照<strong>越靠近优先级越高</strong>原则,&nbsp; 应该是应用&nbsp; .div2class&nbsp; 中的定义, 但实际情况方点并没有去掉.&nbsp;&nbsp; 并没有应用 .div2class 还是按照 #div1 中的设置显示.&nbsp; 这证明 id 的优先级要高于 class.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 总结一点经验就是: <span style="color: rgb(255, 0, 0);"><strong>通过继承来的属性 id 的优先级高于 class <br />
	</strong></span></p>
<p>&nbsp;&nbsp;&nbsp; CSS的优先级顺序: &nbsp; tag中的style &nbsp; <span style="color: rgb(255, 0, 0);">&gt;</span> &nbsp; id &nbsp; &nbsp; <span style="color: rgb(255, 0, 0);">&gt; &nbsp; &nbsp;</span> class&nbsp; <span style="color: rgb(255, 0, 0);">&gt;</span>&nbsp; tag&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(255, 0, 0);">&gt;&nbsp;&nbsp; </span>继承的属性 按同样的顺序</p>
<p>&nbsp;</p>
<p><span style="color: rgb(165, 42, 42);">原创文章 转载请注明出处: <a href="http://www.dengor.com">登高望远</a> [ </span><a href="http://www.dengor.com/archives/618.html"><span id="sample-permalink">http://www.dengor.com/archives/618.html</span></a><span> ]</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1084.html" title="让superfish在IE6不被遮住">让superfish在IE6不被遮住</a></li><li><a href="http://www.dengor.com/archives/350.html" title="用CSS隐藏文字方法的比较">用CSS隐藏文字方法的比较</a></li><li><a href="http://www.dengor.com/archives/323.html" title="用CSS强制改变链接的颜色">用CSS强制改变链接的颜色</a></li><li><a href="http://www.dengor.com/archives/87.html" title="Jquery实现同级元素区别对待">Jquery实现同级元素区别对待</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/618.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>用CSS隐藏文字方法的比较</title>
		<link>http://www.dengor.com/archives/350.html</link>
		<comments>http://www.dengor.com/archives/350.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 17:04:19 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS隐藏文字]]></category>
		<category><![CDATA[文字]]></category>
		<category><![CDATA[隐藏]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=350</guid>
		<description><![CDATA[&#160;&#160; 通过CSS来隐藏文字是网站设计做常用的方法, 有多种方法可以达到隐藏文字的目的. 这些方法各有优点和缺点, 下面就来看看这些用CSS隐藏文字的 一. CSS语句:display:none &#160; 这种方法就是使定义的区块内容都不可见, 来达到隐藏文字的目的，这种方法虽然简便且有效，但它有个致使的缺点就是对搜索引擎不友好，容易被认为是在作弊, 还有好多程序都会认为区块内容没有而略过而读不到内容, 这很不利于SEO的. 关于SEO具体可以看: SEO学习必须通过这个途径 二. CSS语句:text-indent:-9999px &#160;&#160; 此方法是通过text-indent是进行首行无限的负缩进，来达到隐藏文本的目的, 这种方法常见于图片LOGO的处理, 既能显示图片,又能有文字描述, 对SEO很有好处. 但对多行文本就有其不足之处，因为它的物理存在性, 会显示出滚动条.需加上white- space:nowrap;来弥补不足，还需设置line-height:0;或使用超小字体(在IE还是有问题)，最终代码如下: .texthidden{&#160; &#160;text-indent:-9999px;&#160; &#160;white-space:nowrap;&#160; &#160;line-height:0;&#160; } 三. CSS语句:overflow:hidden &#160;&#160;&#160; 这也是一种比较好的方法,通过流出显示区, 而使文字隐藏, 代码如下:&#160; .texthidden{&#160; &#160;display:block; &#160;overflow:hidden;&#160; &#160;width:0;&#160; &#160;height:0;&#160; } &#160; 四. CSS语句:positon:absolute &#160; &#160;&#160;&#160; 用绝对定位把区块定位于非可视区，这种方法如果在定位过于复杂的页面容易产生意想不到的错误. &#160; .texthidden{&#160; &#160;positon:absolute;&#160; &#160;margin-top:-9999px;&#160; &#160;margin-left:-9999px;&#160; } &#160; &#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp; 通过CSS来隐藏文字是网站设计做常用的方法, 有多种方法可以达到隐藏文字的目的. 这些方法各有优点和缺点, 下面就来看看这些用CSS隐藏文字的</p>
<p>	<strong>一. CSS语句:<span style="color: rgb(255, 0, 0);">display:none</span></strong></p>
<p>&nbsp; 这种方法就是使定义的区块内容都不可见, 来达到隐藏文字的目的，这种方法虽然简便且有效，但它有个致使的缺点就是对搜索引擎不友好，容易被认为是在作弊, 还有好多程序都会认为区块内容没有而略过而读不到内容, 这很不利于SEO的. 关于SEO具体可以看: <a href="http://www.dengor.com/archives/308.html">SEO学习必须通过这个途径</a></p>
<p><span id="more-350"></span></p>
<p>
	<strong>二. CSS语句:</strong><span style="color: rgb(255, 0, 0);"><strong>text-indent:-9999px</strong></span></p>
<p>&nbsp;&nbsp; 此方法是通过text-indent是进行首行无限的负缩进，来达到隐藏文本的目的, 这种方法常见于图片LOGO的处理, 既能显示图片,又能有文字描述, 对SEO很有好处. 但对多行文本就有其不足之处，因为它的物理存在性, 会显示出滚动条.需加上white- space:nowrap;来弥补不足，还需设置line-height:0;或使用超小字体(在IE还是有问题)，最终代码如下:</p>
<div class="UBBPanel">
<div class="UBBContent">.texthidden{&nbsp;<br />
		&nbsp;text-indent:-9999px;&nbsp;<br />
		&nbsp;white-space:nowrap;&nbsp;<br />
		&nbsp;line-height:0;&nbsp;<br />
		}</div>
</div>
<p>
	<strong>三. CSS语句:</strong><span style="color: rgb(255, 0, 0);"><strong>overflow:hidden</strong></span></p>
<p>&nbsp;&nbsp;&nbsp; 这也是一种比较好的方法,通过流出显示区, 而使文字隐藏, 代码如下:&nbsp;</p>
<div class="UBBPanel">
<div class="UBBContent">.texthidden{&nbsp;<br />
		&nbsp;display:block;<br />
		&nbsp;overflow:hidden;&nbsp;<br />
		&nbsp;width:0;&nbsp;<br />
		&nbsp;height:0;&nbsp;<br />
		}</div>
<div class="UBBContent">&nbsp;</div>
</div>
<div class="UBBPanel">
<div class="UBBTitle"><strong>四. CSS语句:<span style="color: rgb(255, 0, 0);">positon:absolute</span></strong></div>
<div class="UBBTitle">&nbsp;</div>
<div class="UBBTitle">&nbsp;&nbsp;&nbsp; 用绝对定位把区块定位于非可视区，这种方法如果在定位过于复杂的页面容易产生意想不到的错误.</div>
<div class="UBBTitle">&nbsp;</div>
<div class="UBBContent">.texthidden{&nbsp;<br />
		&nbsp;positon:absolute;&nbsp;<br />
		&nbsp;margin-top:-9999px;&nbsp;<br />
		&nbsp;margin-left:-9999px;&nbsp;<br />
		}</div>
<div class="UBBContent">&nbsp;</div>
<div class="UBBContent">&nbsp;&nbsp; 用CSS隐藏文字方法的比较来看, 推荐二和三的方法, 如果是单行, 要点位显示的, 如LOGO的说明文字, 用<span style="color: rgb(255, 0, 0);"><strong>text-indent:-9999px </strong></span><span>比较好, 而对于内容比较多的使用</span><span style="color: rgb(255, 0, 0);"><strong>overflow:hidden</strong></span>比较好.</div>
<div class="UBBContent">&nbsp;</div>
<div class="UBBContent">&nbsp; 对于其它的文字的修饰, 可以看下: <a href="http://www.dengor.com/archives/256.html">文字中间加横线和对文字打叉</a></div>
<div class="UBBContent">&nbsp;</div>
<div class="UBBContent">本页链接: <span><a href="http://www.dengor.com/archives/350.html">http://www.dengor.com/archives/350.html</a> (转载请注明出处)</span></div>
</div>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1084.html" title="让superfish在IE6不被遮住">让superfish在IE6不被遮住</a></li><li><a href="http://www.dengor.com/archives/618.html" title="CSS样式id和class属性优先级问题">CSS样式id和class属性优先级问题</a></li><li><a href="http://www.dengor.com/archives/477.html" title="Mac中直接打开隐藏的文件或文件夹">Mac中直接打开隐藏的文件或文件夹</a></li><li><a href="http://www.dengor.com/archives/323.html" title="用CSS强制改变链接的颜色">用CSS强制改变链接的颜色</a></li><li><a href="http://www.dengor.com/archives/260.html" title="把PDF中的文字转曲线(outline)">把PDF中的文字转曲线(outline)</a></li><li><a href="http://www.dengor.com/archives/256.html" title="文字中间加横线和对文字打叉">文字中间加横线和对文字打叉</a></li><li><a href="http://www.dengor.com/archives/213.html" title="苹果 Mac OS 下查看系统隐藏文件 ">苹果 Mac OS 下查看系统隐藏文件 </a></li><li><a href="http://www.dengor.com/archives/87.html" title="Jquery实现同级元素区别对待">Jquery实现同级元素区别对待</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/350.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>用CSS强制改变链接的颜色</title>
		<link>http://www.dengor.com/archives/323.html</link>
		<comments>http://www.dengor.com/archives/323.html#comments</comments>
		<pubDate>Mon, 02 Nov 2009 06:47:11 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[平面美化]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[改变]]></category>
		<category><![CDATA[链接]]></category>
		<category><![CDATA[颜色]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=323</guid>
		<description><![CDATA[&#160;&#160;&#160; 在我们写有的程序模板的时,&#160;&#160; 有时想突出重点, 想临时改变链接的颜色.&#160; 会发出不太好操作,&#160; 因为如果用CSS直接定义&#60;a&#62;的color 是不能改变链接的颜色的.&#160; 要去定义上级元素的 a 属性,&#160; 这样如果只有少量的几个链接要改变颜色, 这样去做就太麻烦了.&#160; &#160;&#160;&#160; 有没有简单一点的方法. 我的做法是先设好几个颜色的class,&#160; 直接在&#160; &#60;a&#62; 里加入一个class就行了. 如 :&#160; &#60;a href=&#34;http://www.dengor.com&#34;&#160; class=&#39;&#39;red&#34;&#62;登高望远&#60;/a&#62; 效果: 登高望远 下面是CSS代码: a.white:link {color:#FFFFFF;} /*白色的链接 */ a.whitevisited {color:#FFFFF;} /*已访问的白色的链接*/ a.red:link {color:#FF0000;} /*红色的链接 */ a.red:visited {color:#FF0000;} /*红色已访问的链接*/ a.green:link {color:#339900;} /*绿色的链接 */ a.green:visited {color: #339900;} /*绿色已访问的链接*/ a.blue:link {color:#000099;;} /*蓝色的链接 */ a.blue:visited {color:#000099;;} /*蓝色已访问的链接*/ [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp; 在我们写<a href="http://www.dengor.com/archives/184.html">有的程序模板</a>的时,&nbsp;&nbsp; 有时想突出重点, 想临时<strong>改变链接的颜色</strong>.&nbsp; 会发出不太好操作,&nbsp; 因为如果用<strong>CSS</strong>直接定义&lt;a&gt;的color 是不能改变链接的颜色的.&nbsp; 要去定义上级元素的 a 属性,&nbsp; 这样如果只有少量的几个链接要改变颜色, 这样去做就太麻烦了.&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 有没有简单一点的方法. 我的做法是先设好几个颜色的class,&nbsp; 直接在&nbsp; &lt;a&gt; 里加入一个class就行了.</p>
<p><span id="more-323"></span></p>
<p>如 :&nbsp; &lt;a href=&quot;http://www.dengor.com&quot;&nbsp; class=&#39;&#39;red&quot;&gt;登高望远&lt;/a&gt;</p>
<p>效果: <a class="red" href="http://www.dengor.com">登高望远</a></p>
<p>下面是CSS代码:</p>
<pre id="line1">a.white:link {color:#FFFFFF;} /*白色的链接 */
a.whitevisited {color:#FFFFF;} /*已访问的白色的链接*/
a.red:link {color:#FF0000;} /*红色的链接 */
a.red:visited {color:#FF0000;} /*红色已访问的链接*/

a.green:link {color:#339900;} /*绿色的链接 */
a.green:visited {color: #339900;} /*绿色已访问的链接*/

a.blue:link {color:#000099;;} /*蓝色的链接 */
a.blue:visited {color:#000099;;} /*蓝色已访问的链接*/
</pre>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1084.html" title="让superfish在IE6不被遮住">让superfish在IE6不被遮住</a></li><li><a href="http://www.dengor.com/archives/889.html" title="Firefox查看源码链接如何返回上级源码">Firefox查看源码链接如何返回上级源码</a></li><li><a href="http://www.dengor.com/archives/618.html" title="CSS样式id和class属性优先级问题">CSS样式id和class属性优先级问题</a></li><li><a href="http://www.dengor.com/archives/350.html" title="用CSS隐藏文字方法的比较">用CSS隐藏文字方法的比较</a></li><li><a href="http://www.dengor.com/archives/282.html" title="如何写没有链接目标的超链接">如何写没有链接目标的超链接</a></li><li><a href="http://www.dengor.com/archives/87.html" title="Jquery实现同级元素区别对待">Jquery实现同级元素区别对待</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/323.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery实现同级元素区别对待</title>
		<link>http://www.dengor.com/archives/87.html</link>
		<comments>http://www.dengor.com/archives/87.html#comments</comments>
		<pubDate>Fri, 31 Jul 2009 13:11:55 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[平面美化]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=87</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160; 对一个没有确定数目的element,&#160;&#160; 如果有的元素跟其它的不一样,处理起来很麻烦.&#160; 比如一个网站的导航菜单,我们希望在第每个菜单项的中间加个&#160; &#124; 来分隔, 这样的情形如果每项都用相同的style, 最后的一个也会出现一个分隔, 显然这不是我们所想要的. 所以你必须到程序中设置输出最后一项时,使用不同的Class.&#160; 这样程序和页面两个方面都要更改. &#160;&#160;&#160;&#160; 其实如果我们用Jquery的强大元素选择能力,完全可以不用去修改程序,只要在页面和加上几行JS代码就可以实现. &#160;前提是页面载入了jquery, 加入以下代码: $(document).ready(function() { $(&#34;#menu li:last&#34;).addClass(&#34;noseptation&#34;); }); &#160;&#160;&#160;&#160; 其中的$(&#34;#menu li:last&#34;)就是选择了id为menu的区块最后一个&#60;li&#62; ,后面就是加上一个class,这个class设置没有分隔符就行了. 我们可以看出, &#160;&#160;&#160;&#160; 这种方法很简单, 还可以选择first,second,third&#8230;last,都可以加上不同的class. 确实很方便. &#160; 相关文章让superfish在IE6不被遮住用js解决广告代码载入慢的问题JavaScript字符处理函数Jquery使用php进行ajax调用例子Iframe之间传值和数据的方法CSS样式id和class属性优先级问题用CSS隐藏文字方法的比较用CSS强制改变链接的颜色如何写没有链接目标的超链接Jquery中value属性的使用方法]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对一个没有确定数目的element,&nbsp;&nbsp; 如果有的元素跟其它的不一样,处理起来很麻烦.&nbsp; 比如一个网站的导航菜单,我们希望在第每个菜单项的中间加个&nbsp; | 来分隔, 这样的情形如果每项都用相同的style, 最后的一个也会出现一个分隔, 显然这不是我们所想要的. 所以你必须到程序中设置输出最后一项时,使用不同的Class.&nbsp; 这样程序和页面两个方面都要更改.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 其实如果我们用Jquery的强大元素选择能力,完全可以不用去修改程序,只要在页面和加上几行JS代码就可以实现.</p>
<p>&nbsp;前提是页面载入了jquery, 加入以下代码:</p>
<pre>
$(document).ready(function() {
	$(&quot;#menu li:last&quot;).addClass(&quot;noseptation&quot;);
});
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;    其中的$(&quot;#menu li:last&quot;)就是选择了id为menu的区块最后一个&lt;li&gt; ,后面就是加上一个class,这个class设置没有分隔符就行了.     我们可以看出,</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 这种方法很简单, 还可以选择first,second,third&#8230;last,都可以加上不同的class. 确实很方便.</p>
<p>&nbsp;</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1084.html" title="让superfish在IE6不被遮住">让superfish在IE6不被遮住</a></li><li><a href="http://www.dengor.com/archives/840.html" title="用js解决广告代码载入慢的问题">用js解决广告代码载入慢的问题</a></li><li><a href="http://www.dengor.com/archives/761.html" title="JavaScript字符处理函数">JavaScript字符处理函数</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/681.html" title="Iframe之间传值和数据的方法">Iframe之间传值和数据的方法</a></li><li><a href="http://www.dengor.com/archives/618.html" title="CSS样式id和class属性优先级问题">CSS样式id和class属性优先级问题</a></li><li><a href="http://www.dengor.com/archives/350.html" title="用CSS隐藏文字方法的比较">用CSS隐藏文字方法的比较</a></li><li><a href="http://www.dengor.com/archives/323.html" title="用CSS强制改变链接的颜色">用CSS强制改变链接的颜色</a></li><li><a href="http://www.dengor.com/archives/282.html" title="如何写没有链接目标的超链接">如何写没有链接目标的超链接</a></li><li><a href="http://www.dengor.com/archives/253.html" title="Jquery中value属性的使用方法">Jquery中value属性的使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/87.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

