<?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://leqcany.com/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://leqcany.com</link>
	<description>年轻、态度、折腾、生活。</description>
	<lastBuildDate>Wed, 09 Jun 2010 13:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS打造简洁的导航栏</title>
		<link>http://leqcany.com/2009/11/css-nav.html</link>
		<comments>http://leqcany.com/2009/11/css-nav.html#comments</comments>
		<pubDate>Sun, 15 Nov 2009 12:37:32 +0000</pubDate>
		<dc:creator>leplay</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[导航栏]]></category>

		<guid isPermaLink="false">http://leqcany.com/?p=767</guid>
		<description><![CDATA[
其实要考虑的问题只有两个：一个是两个栏目直接的间隔线，另一个是鼠标放到栏目上时背景颜色的变化。
	我们一个一个来解决。
间隔线其实是由一条颜色为#DDD和一条颜色为#FFF的边框组成，可以由border-left 或者 border-right实现。

.leftborder&#123; background:#EEE;border-left:1px solid #FFF;&#125;
.rightborder&#123; background:#EEE; border-right:1px solid #DDD;&#125;

这是所有浏览器都能实现的方法。但如果你用的是Firefox浏览器，那么还有更简单的方法。因为Firefox支持border-colors(详见CSS3.0参考手册),所以你可以直接把两种颜色同时加到一个边框里。代码如下。

.ffrightborder&#123; -moz-border-right-colors:#FFF #DDD; border-right-width:2px; border-right-style:solid;&#125;

这样就搞定了第一个问题。然后给出第二个问题的代码，我负责解释。

ul&#123;position:relative; clear:both; padding-top:20px;&#125;
ul li&#123; width:100px;  float:left; list-style:none; text-align:center;&#125;
ul li a,ul li a:visited&#123;position:relative; display:block; text-decoration:none; color:#005A9C;&#125;
ul li a:hover&#123;display:block; background: #FAFAFA; margin:0 auto; width:100%; color:#424242;&#125;

应该都很好理解，重点在于 &#8220;display:block;&#8221;，这个属性让整个&#60;li&#62;区域的背景都改变的关键，否则只是文字的背景发生变化。
好吧，给出Demo你自己看看就知道了：http://leqcany.com/demo/nav.html
PS: 在Firefox下可看到两个导航栏具有同样的效果。

© leplay for 乐趣参与, 2009. &#124;
Permalink &#124;
No comment &#124;

Post tags: CSS, 导航栏
]]></description>
			<content:encoded><![CDATA[<p><a href="http://leqcany.com/demo/nav.html"><img alt="Demo" class="alignnone size-full wp-image-768" height="83" src="http://leqcany.com/wordpress/wp-content/uploads/2009/11/nav.jpg" title="nav" width="390" /></a></p>
<p>其实要考虑的问题只有两个：一个是两个栏目直接的间隔线，另一个是鼠标放到栏目上时背景颜色的变化。<br />
	我们一个一个来解决。</p>
<p>间隔线其实是由一条颜色为#DDD和一条颜色为#FFF的边框组成，可以由border-left 或者 border-right实现。</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.leftborder</span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#EEE</span><span style="color: #00AA00;">;</span>border-<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#FFF</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.rightborder</span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#EEE</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#DDD</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>这是所有浏览器都能实现的方法。但如果你用的是Firefox浏览器，那么还有更简单的方法。因为Firefox支持border-color<span style="color: rgb(255, 0, 0);">s</span>(详见<a href="http://webteam.tencent.com/css3/">CSS3.0参考手册</a>),所以你可以直接把两种颜色同时加到一个边框里。代码如下。</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.ffrightborder</span><span style="color: #00AA00;">&#123;</span> -moz-border-right-colors<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFF</span> <span style="color: #cc00cc;">#DDD</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>这样就搞定了第一个问题。然后给出第二个问题的代码，我负责解释。</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">ul<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
ul li<span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
ul li a<span style="color: #00AA00;">,</span>ul li a<span style="color: #3333ff;">:visited</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;">relative</span><span style="color: #00AA00;">;</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;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#005A9C</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
ul li a<span style="color: #3333ff;">:hover</span><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;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FAFAFA</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</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;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#424242</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>应该都很好理解，重点在于 &ldquo;display:block;&rdquo;，这个属性让整个&lt;li&gt;区域的背景都改变的关键，否则只是文字的背景发生变化。</p>
<p>好吧，给出Demo你自己看看就知道了：<a href="http://leqcany.com/demo/nav.html">http://leqcany.com/demo/nav.html</a></p>
<p>PS: 在Firefox下可看到两个导航栏具有同样的效果。</p>
<hr />
<p><small>© leplay for <a href="http://leqcany.com">乐趣参与</a>, 2009. |
<a href="http://leqcany.com/2009/11/css-nav.html">Permalink</a> |
<a href="http://leqcany.com/2009/11/css-nav.html#comments">No comment</a> |

Post tags: <a href="http://leqcany.com/tag/css" rel="tag">CSS</a>, <a href="http://leqcany.com/tag/%e5%af%bc%e8%88%aa%e6%a0%8f" rel="tag">导航栏</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://leqcany.com/2009/11/css-nav.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>校内模板——不要在校内浪费太多时间</title>
		<link>http://leqcany.com/2009/03/xiaonei-templet.html</link>
		<comments>http://leqcany.com/2009/03/xiaonei-templet.html#comments</comments>
		<pubDate>Wed, 04 Mar 2009 03:52:29 +0000</pubDate>
		<dc:creator>leplay</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[东拉&西扯]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[校内]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://leqcany.com/?p=492</guid>
		<description><![CDATA[&#160;

&#160;预览
&#160;
名称：Waste-time
主题：不要在校内浪费太多时间！
代码：
body { 
&#160;&#160;&#160; margin:10px auto;
&#160;&#160;&#160; color: #3C3940;
&#160;&#160;&#160; font:13px , &#34;Comic Sans MS&#34;, &#34;Trebuchet MS&#34;, verdana, sans-serif;
&#160;&#160;&#160; background: #1A1B1F url(&#8216;http://xiaopback.cn/images/wastebg.gif&#8217;) fixed no-repeat top left; 
}
a:link {color: #1f3a87; text-decoration:none;}
a:visited {color: #1f3a87;text-decoration:none;}
a:hover {color: #bc2931; text-decoration: underline;}
a:active {color: #bc2931;}
 /* Made By ZhouGe ^^ */ 
.profile .profile-panel{ background:url() no-repeat 50% 0;border-bottom:none;}
.betabar { opacity:0.0; }
.menu-bar { opacity:0.0; }
  .left-column{ [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p><img alt="" src="http://leqcany.com/wordpress/wp-content/uploads/2009/03/waste-time.jpg" /></p>
<p><a href="http://xiaonei.com/profile.do?id=237534074" target="_blank">&nbsp;预览</a></p>
<p>&nbsp;</p>
<p>名称：Waste-time</p>
<p>主题：不要在校内浪费太多时间！</p>
<p>代码：<br />
<span style="color: rgb(51, 51, 153);">body { <br />
&nbsp;&nbsp;&nbsp; margin:10px auto;<br />
&nbsp;&nbsp;&nbsp; color: #3C3940;<br />
&nbsp;&nbsp;&nbsp; font:13px , &quot;Comic Sans MS&quot;, &quot;Trebuchet MS&quot;, verdana, sans-serif;<br />
&nbsp;&nbsp;&nbsp; background: #1A1B1F url(&#8216;http://xiaopback.cn/images/wastebg.gif&#8217;) fixed no-repeat top left; <br />
}<br />
a:link {color: #1f3a87; text-decoration:none;}<br />
a:visited {color: #1f3a87;text-decoration:none;}<br />
a:hover {color: #bc2931; text-decoration: underline;}<br />
a:active {color: #bc2931;}</p>
<p></span> <span style="color: rgb(51, 51, 153);">/* Made By ZhouGe ^^ */ <br />
.profile .profile-panel{ background:url() no-repeat 50% 0;border-bottom:none;}<br />
.betabar { opacity:0.0; }<br />
.menu-bar { opacity:0.0; }</p>
<p></span> <span style="color: rgb(51, 51, 153);"> .left-column{ margin:0 auto; background-color: #FFF; padding-top:20px; padding-bottom:10px; -webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px;-webkit-border-top-left-radius: 5px; border-left:7px solid #FFF;}<br />
.profile-tabs{ margin:0 auto; background-color:#FFF; padding-top:20px; -moz-border-radius-topright: 5px;-webkit-border-top-right-radius: 5px; -moz-border-radius-topleft: 5px;-webkit-border-top-left-radius: 5px;}<br />
.tab-content{ margin:0 auto; width:950px; background-color:#FFF; -moz-border-radius-bottomright: 5px;-webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px;-webkit-border-bottom-left-radius: 5px;}<br />
#footer{ margin:0 auto; width:950px; background-color:#FFF; -moz-border-radius: 5px;-webkit-border-radius: 5px; padding-top:3px; margin-top:15px; margin-bottom:40px;}</span></p>
<p>使用方法：你比我清楚。</p>
<p>使用代价：原则上免费，但你要是非要请我吃饭或者棒棒糖的话，我是不会拒绝的。</p>
<hr />
<p><small>© leplay for <a href="http://leqcany.com">乐趣参与</a>, 2009. |
<a href="http://leqcany.com/2009/03/xiaonei-templet.html">Permalink</a> |
<a href="http://leqcany.com/2009/03/xiaonei-templet.html#comments">No comment</a> |

Post tags: <a href="http://leqcany.com/tag/css" rel="tag">CSS</a>, <a href="http://leqcany.com/tag/%e6%a0%a1%e5%86%85" rel="tag">校内</a>, <a href="http://leqcany.com/tag/%e6%a8%a1%e6%9d%bf" rel="tag">模板</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://leqcany.com/2009/03/xiaonei-templet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>网页正方形区域的另类使用方法</title>
		<link>http://leqcany.com/2008/12/specia-square.html</link>
		<comments>http://leqcany.com/2008/12/specia-square.html#comments</comments>
		<pubDate>Tue, 16 Dec 2008 05:29:20 +0000</pubDate>
		<dc:creator>ZhouGe</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://leqcany.com/?p=113</guid>
		<description><![CDATA[&#160;
如果你的网站正好有一块正方形区域，如果要在这个正方形区域内放入5个栏目，那么你会怎样设计呢？
我在我以前的个人网站上遇到过这种情况。当时我的设计是&#8230;&#8230;（见下图）：
&#160;
&#160;







&#160;
这个并不是用table做的，而是用CSS做的。怎么样？还不错吧。哈哈。
您也可以点这里查看该网页。
如果你对该网页的CSS感兴趣，可通过浏览器的查看源代码选项进行查看。注意在DIV调用时的顺序依次为 up &#8211; topright &#8211; mid &#8211; bottomleft &#8211; down 。
&#160;

© ZhouGe for 乐趣参与, 2008. &#124;
Permalink &#124;
No comment &#124;

Post tags: CSS, Web Design
]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>如果你的网站正好有一块正方形区域，如果要在这个正方形区域内放入5个栏目，那么你会怎样设计呢？</p>
<p>我在我以前的个人网站上遇到过这种情况。当时我的设计是&hellip;&hellip;（见下图）：</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="550" height="470" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td><img width="450" height="450" src="http://leqcany.com/wordpress/wp-content/uploads/2008/12/demo.jpg" alt="demo" title="demo" class="alignleft size-full wp-image-117" /></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>这个并不是用table做的，而是用CSS做的。怎么样？还不错吧。哈哈。</p>
<p>您也可以点<a href="http://leqcany.com/demo/demo.html" target="_blank">这里</a>查看该网页。</p>
<p>如果你对该网页的CSS感兴趣，可通过浏览器的<strong>查看源代码</strong>选项进行查看。注意在DIV调用时的顺序依次为 up &#8211; topright &#8211; mid &#8211; bottomleft &#8211; down 。</p>
<p>&nbsp;</p>
<hr />
<p><small>© ZhouGe for <a href="http://leqcany.com">乐趣参与</a>, 2008. |
<a href="http://leqcany.com/2008/12/specia-square.html">Permalink</a> |
<a href="http://leqcany.com/2008/12/specia-square.html#comments">No comment</a> |

Post tags: <a href="http://leqcany.com/tag/css" rel="tag">CSS</a>, <a href="http://leqcany.com/tag/webdesign" rel="tag">Web Design</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://leqcany.com/2008/12/specia-square.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
