<?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>eddie.Yang's  creative &#187; css</title>
	<atom:link href="http://www.ediyang.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ediyang.com</link>
	<description>Creative change lives</description>
	<lastBuildDate>Wed, 14 Jul 2010 02:06:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>简单针对IE6,7,8的CSS hack</title>
		<link>http://www.ediyang.com/how-to-target-ie6-ie7-and-ie8/</link>
		<comments>http://www.ediyang.com/how-to-target-ie6-ie7-and-ie8/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 06:17:36 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://www.ediyang.com/?p=834</guid>
		<description><![CDATA[本文是针对IE各个版本使用\9 *等简单字符进行hack的定位。]]></description>
			<content:encoded><![CDATA[<p>刚好看到有这么一篇文章，翻译过来给需要的人看看，同时也给自己看看。</p>
<pre><code>
body{
         color:red; //所有浏览器
         color:yellow\9; //IE8及以下
         *color:blue; //IE7及以下
         _color:gray; //IE6
}
</code></pre>
<p>值得注意的是\9是针对IE8及以下版本（未测试是否包含IE6以下版本),而如果是color:orange/0;把9换成0就是只针对IE8的hack了。<br />
同时还要注意，<a href="http://www.quirksmode.org/css/condcom.html">条件注释</a>(conditional comments)是一种更好的hack方式。</p>
<pre><code>
&lt;!--[if IE 6]&gt;
      body{
              color:green; //IE6
      }
&lt;![endif]--&gt;
</code></pre>
<p>本文翻译自http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-how-to-target-ie6-ie7-and-ie8-uniquely-with-4-characters/<br />
并做细微修改。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ediyang.com/how-to-target-ie6-ie7-and-ie8/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>CSS3:文字阴影知多少</title>
		<link>http://www.ediyang.com/css3-text-shadow-why-and-how/</link>
		<comments>http://www.ediyang.com/css3-text-shadow-why-and-how/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 13:05:27 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.ediyang.com/?p=747</guid>
		<description><![CDATA[由于最近我因为要安装Firebug 1.4导致我不得不安装了Firefox 3.5,所以很不小心地接触到了Wordpress后台那漂亮的文字阴影.也就是CSS中的text-shadow属性.所以今天我整理了一些资料,希望可以对大家有所启发.]]></description>
			<content:encoded><![CDATA[<p>最近我因为要安装<a href="https://addons.mozilla.org/zh-CN/firefox/addon/1843">Firebug 1.4</a>导致我不得不安装了<a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox 3.5</a>,所以很不小心地接触到了Wordpress后台那漂亮的文字阴影.也就是CSS中的text-shadow属性.所以今天我整理了一些资料,希望可以对大家<strong>有所启发</strong>.</p>
<p>首先我们看看<strong>wordpress 2.8</strong>后台使用了text-shadow的部分(绿色箭头).觉得怎么样?没错,这些都是CSS3属性,而不是图片做成的.</p>
<p><img class="size-full wp-image-752" title="wordpress 2.8 阴影" src="http://www.ediyang.com/wp-content/uploads/2009/06/21.PNG" alt="wordpress 2.8 阴影" width="398" height="154" /></p>
<h3>text-shadow是什么?</h3>
<p>text-shadow早在CSS2中已经存在,而现在CSS3也准备将他加入其中.并且由于一直以来只有Safari支持这个属性所以我们<strong>很少见到</strong>真正的应用,直到最近Firefox 3.5对它的支持然重新唤起了人们对它的<strong>兴趣</strong>.</p>
<p>text-shadow可以支持给文字加上阴影,这样我们在设计时可以利用css3属性<a href="http://www.ediyang.com/photoshop-text-effect-skills/">增加文字的质感</a>而不用使用任何图片.</p>
<p>目前支持的浏览器有Firefox 3.1+,Safari 3+,Opera 9.5+等现代浏览器(数据可能有偏差).当然IE家族是无法支持的.</p>
<p>接下来看看text-shadow的<strong>语法</strong>:</p>
<pre><code>text-shadow:color length length length;</code></pre>
<p>color:颜色; length分别按顺序指&#8221;<strong>X轴方向长度 Y轴方向长度 阴影模糊半径</strong>&#8221;</p>
<p>正值在X轴表示向右,负值表示向左.同样的道理Y轴负值是表示向上.</p>
<p>其中任意一个值可以为零也可为空(将做默认处理)</p>
<p>举个例子:</p>
<pre><code>text-shadow: -1px 2px 3px #ffb69a;</code></pre>
<p>表示X轴方向阴影向左1px,Y轴方向阴影向下2px,而阴影模糊半径3px,颜色为 #ffb69a</p>
<h3>一些试验与demo</h3>
<p>我做了点小小的试验,做成了一个<strong><a href="http://www.ediyang.com/demo/textShadow/">Demo</a></strong>页面.</p>
<p>为了向浏览器<strong>不支持</strong>text-shadow的用户看到阴影效果,请直接看以下<strong>截图</strong>(有位朋友说那个&#8221;火鸟&#8221;看起来像&#8221;鸡&#8221;):</p>
<p><a href="http://www.ediyang.com/demo/textShadow/"><img class="size-full wp-image-745" title="CSS文字阴影" src="http://www.ediyang.com/wp-content/uploads/2009/06/1.PNG" alt="textshadow文字阴影" width="325" height="276" /></a></p>
<p><strong>如果</strong>你使用的是Firefox 3.1+,Safari等浏览器,那请直接点<strong><a href="http://www.ediyang.com/demo/textShadow/">Demo演示</a></strong></p>
<h3>为什么使用text-shadow</h3>
<ul>
<li>可以增强文字<strong>质感</strong></li>
<li>可以减少图片的使用,减少<strong>带宽</strong>支出</li>
<li>随着Firefox 3.5支持text-shadow,不久很多人将可以看到你定义的阴影</li>
</ul>
<p><strong>不相信?</strong>请看看下面的截图,这是对<a href="http://tweetcc.com/">http://tweetcc.com/</a>网站分别在safari 4(win)与Firefox 3.0.11下所进行的截图.很明显在有text-shadow应用下整体文字<strong>层次感</strong>好了许多.</p>
<p><a href="http://tweetcc.com"><img class="alignnone size-full wp-image-755" title="tweetcc" src="http://www.ediyang.com/wp-content/uploads/2009/06/5.png" alt="tweetcc" width="450" height="304" /></a></p>
<h3>其他例子</h3>
<p>接下来我们继续看看一些<strong>有趣</strong>的text-shadow下的例子吧,首先看看<a href="http://vikiworks.com">vikiworks</a>用text-shadow来显示程序代码.很多人都觉得这个效果很赞,没错,该网站用的就是css3属性.</p>
<p><a href="http://vikiworks.com/2009/04/25/wordpress-image-roll/"><img class="alignnone size-full wp-image-756" title="vikiworks" src="http://www.ediyang.com/wp-content/uploads/2009/06/vikiworks.PNG" alt=" CSS3:文字阴影知多少" width="421" height="155" /></a></p>
<h4>参考资料及常见问题</h4>
<p>看完上面觉得不够,那么可以参考一下下面的文章.</p>
<ul>
<li><a href="http://www.css3.info/preview/text-shadow/">http://www.css3.info/preview/text-shadow/</a></li>
<li><a href="http://www.w3.org/TR/2003/CR-css3-text-20030514/#text-shadows">http://www.w3.org/TR/2003/CR-css3-text-20030514/#text-shadows</a></li>
<li><a href="http://www.quirksmode.org/css/textshadow.html">http://www.quirksmode.org/css/textshadow.html</a></li>
</ul>
<p><strong>问题</strong>有:</p>
<ul>
<li>如果使用了blur,也就是定义了阴影模糊半径,会导致页面在滚动时变慢.</li>
</ul>
<p>转载请注明来源:<a href="http://www.ediyang.com/css3-text-shadow-why-and-how/">http://www.ediyang.com/css3-text-shadow-why-and-how/</a></p>
<p><strong>请留意:</strong>本文章旨在<del datetime="2009-06-19T13:22:04+00:00">借刀杀人</del>抛砖引玉引起大家对CSS3的兴趣.</p>
<p>也比较侧重该属性呈现的效果,所以对该属性的技术性讲解及定义都有所偏差,请原谅.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ediyang.com/css3-text-shadow-why-and-how/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>CSS:@import与link的具体区别</title>
		<link>http://www.ediyang.com/different-import-or-link-css/</link>
		<comments>http://www.ediyang.com/different-import-or-link-css/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:46:51 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.ediyang.com/?p=500</guid>
		<description><![CDATA[我们知道在网页中引用外部CSS有两种方式，即:<strong>@import</strong>与<strong>link</strong>,我们也经常听到有人说要使用link来引入CSS更好,但是你知道为什么吗?]]></description>
			<content:encoded><![CDATA[<p>我们知道在网页中引用外部CSS有两种方式，即:<strong>@import</strong>与<strong>link</strong>,我们也经常听到有人说要使用link来引入CSS更好,但是你知道为什么吗?</p>
<h4>link</h4>
<p>link就是把外部CSS与网页连接起来,具体形式:</p>
<pre><code>&lt;link rel='stylesheet' href='style.css' type='text/css'/&gt;</code></pre>
<h4>@import</h4>
<p>import文字上与link的区别就是它可以把在一个CSS文件中引入其它几个CSS文件,具体形式:</p>
<pre><code>@import url("styles.css");</code></pre>
<h4>为什么使用@import</h4>
<p>大部分使用@import方式的人是因为旧的浏览器是不支持@import方式的,这意味着我们可以使用@import来引入只让现代浏览器解析的CSS样式.</p>
<p>使用以下代码可以使IE6及以下的浏览器无法解析该CSS(IE6以下的属于年久失修在这里略去方法)</p>
<pre><code>@import url(../style.css) screen;<span id="more-500"></span></pre>
<p>另一个主要的原因就是当你的网页需要引入几个外部CSS文件时.你可以使用link引入一个CSS,然后在这个CSS文件中用@import方式引入其它几个CSS文件.这样看起来更容易管理.</p>
<h4>为什么使用link</h4>
<p>使用link方式一个最主要的原因就是你可以让用户切换CSS样式.现代浏览器如Firefox,Opera,Safari都支持rel="alternate stylesheet"属性(即可在浏览器上选择不同的风格),当然你还可以使用Javascript使得IE也支持用户更换样式.</p>
<p>如不明白,请进入这个<a href="http://www.w3.org/Style/Examples/007/alternatives">页面</a>,然后在Firefox中点击"查看-页面风格".</p>
<h4>@import的小毛病</h4>
<p>如果你网页head标签里面十分简单,只有@import属性的话,当用户浏览的网速较慢时,他会看到一个没有风格样式的页面,然后随着CSS文件被下载完成才可以看到应有的风格.要避免这样的问题,你需要确保head里至少有一个script或是link标签.</p>
<p><strong>04-11更新</strong>:  @import会使得CSS整体载入时间变长.并且在IE中会导致文件下载次序被更改,例如放置在@import后面的script文件会在CSS之前被下载.</p>
<p>详情请参考<a href="http://www.stevesouders.com/blog/2009/04/09/dont-use-import/">http://www.stevesouders.com/blog/2009/04/09/dont-use-import/</a></p>
<h4>到底要用那种方式</h4>
<p>就目前看来小型的网站还是使用link比较合适(或者说比较流行),当然如果将来我们需要把CSS进行模块化管理也肯定要用到@import.</p>
<p>参考资料:<a href="http://webdesign.about.com/od/beginningcss/f/css_import_link.htm">What's the Difference Between @import and link for CSS?</a> 以作学习之用,欢迎补充.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ediyang.com/different-import-or-link-css/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CSS制作水彩画风格的导航栏</title>
		<link>http://www.ediyang.com/css-watercolor-effect-website-menu/</link>
		<comments>http://www.ediyang.com/css-watercolor-effect-website-menu/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 05:25:13 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[menu]]></category>

		<guid isPermaLink="false">http://www.ediyang.com/?p=390</guid>
		<description><![CDATA[很多天前我教大家利用Photoshop设计一个水彩画风格的导航栏,今天我将一步一步演示给大家看如果利用上期教程设计的图,使用CSS来制作一个导航栏.并且还会涉及到Photoshop的切图技巧,是学习网页制图与CSS的好教程.]]></description>
			<content:encoded><![CDATA[<p>很多天前我教大家利用<a href="http://www.ediyang.com/design-watercolor-effect-website-menu/">Photoshop设计一个水彩画风格的导航栏</a>,今天我将一步一步演示给大家看如果利用上期教程设计的图,使用CSS来制作一个导航栏.并且还会涉及到Photoshop的切图技巧,是学习网页制图与CSS的好教程.<br />
<a href="http://www.webdesignerwall.com/demo/advanced-css-menu/?TB_iframe=true&amp;height=270&amp;width=810">在线演示</a><br />
<a href="http://www.webdesignerwall.com/file/advanced-css-menu.zip">下载ZIP文件</a></p>
<h4>概览</h4>
<p>以下就是我们这个教程所需要用到的图片，如果你没有的话，可以从上面下载的压缩包里得到.<br />
<img class="alignnone size-full wp-image-395" title="css-menu1" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu1.jpg" alt="css menu1 CSS制作水彩画风格的导航栏" width="480" height="235" /></p>
<h4>1.主背景</h4>
<p>打开PSD文件,然后把“文字”层组隐藏（点击图层左边的小眼睛）.然后保存为main-bg.jpg(eddie提醒:较好的方法是点击菜单栏的&#8221;文件-存为Web和设备所用格式&#8221;，这样将使图片体积减小)<br />
<img class="alignnone size-full wp-image-396" title="css-menu2" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu2.jpg" alt="css menu2 CSS制作水彩画风格的导航栏" width="480" height="206" /></p>
<h4>2.按钮图</h4>
<p>把&#8221;背景&#8221;层隐藏只留下文字层可见,现在如下图所示在home上画一个矩形选区,接着在菜单栏点&#8221;编辑-拷贝合并(Shift+Ctrl+C)&#8221;<br />
<img class="alignnone size-medium wp-image-397" title="css-menu3" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu3-300x114.jpg" alt="css menu3 300x114 CSS制作水彩画风格的导航栏" width="300" height="114" /><br />
然后创建一个新文件，注意尺寸应该跟刚才的矩形选区一样大（如果不知道多大，请打开&#8221;窗口-信息&#8221;).<br />
接着把刚才复制的图层粘贴在新画布里,接着点&#8221;图像-画布大小&#8221;,把高度改为原高度的2倍,如图,并点击下方的&#8221;向下箭头&#8221;.<br />
<img class="alignnone size-full wp-image-398" title="css-menu41" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu41.jpg" alt="css menu41 CSS制作水彩画风格的导航栏" width="370" height="348" /><br />
接着在粘贴一次那个HOME图层,并把位置调整到上方.接着把HOME周围的边框用&#8221;橡皮擦&#8221;擦掉.<br />
<img class="alignnone size-full wp-image-399" title="css-menu42" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu42.jpg" alt="css menu42 CSS制作水彩画风格的导航栏" width="480" height="180" /><br />
这就是我们最后要的效果,按钮的大小就是刚才那个选区大小,当鼠标移上按钮的时候,就会变成有边框的那个HOME.<br />
<img class="alignnone size-full wp-image-400" title="css-menu51" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu51.gif" alt="css menu51 CSS制作水彩画风格的导航栏" width="400" height="220" /><br />
重复移上步骤知道你拥有其他的按钮.(eddie提醒:如果保持每个按钮一样大会比较方便后续的制作).<br />
<img class="alignnone size-full wp-image-401" title="css-menu52" src="http://www.ediyang.com/wp-content/uploads/2009/03/css-menu52.jpg" alt="css menu52 CSS制作水彩画风格的导航栏" width="480" height="235" /></p>
<h4>3.HTML代码</h4>
<p>注意到我们使用的是无序列表ul来制作导航,ul的id是menu,并且每个li都有一个class.一个空span标签是为了实现鼠标移上去的效果.代码如下:</p>
<pre><code>
&lt;ul id="menu"&gt;
&lt;li&gt;&lt;a class="home" href="#"&gt;Home &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="about" href="#"&gt;About &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="rss" href="#"&gt;RSS &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<h4>4.CSS代码</h4>
<p><strong>#menu的CSS</strong><br />
把所有margin与padding重置为0,在这里最主要就是设置position:relative;以便后面利用绝对定位来布局按钮</p>
<pre><code>
#menu {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 774px;
  height: 210px;
  background: url(images/menu-bg.jpg) no-repeat;
  position: relative;
}
</code></pre>
<p><strong>#menu span</strong><br />
把display设置为none是因为span平时是不需要显示的,知道鼠标移到按钮上</p>
<pre><code>
#menu span {
  display: none;
  position: absolute;
}
</code></pre>
<p><strong>#menu a</strong><br />
设置text-indent: -900%;的作用是使html的文字移到用户看不见的地方（但是搜索引擎蜘蛛会看到）.</p>
<pre><code>
#menu a {
  display: block;
  text-indent: -900%;
  position: absolute;
  outline: none;
}
</code></pre>
<p><strong>#menu a:hover</strong><br />
当鼠标移上去时候背景图定位到bottom</p>
<pre><code>
#menu a:hover {
  background-position: left bottom;
}
</code></pre>
<p><strong>#menu a:hover span</strong><br />
当鼠标移上去时候,让span标签显示出来(从none到block)</p>
<pre lang="css">#menu a:hover span {
  display: block;
}</pre>
<p><strong>#menu .home</strong><br />
设置按钮的尺寸与背景图</p>
<pre><code>
#menu .home {
  width: 144px;
  height: 58px;
  background: url(images/home.gif) no-repeat;
  left: 96px;
  top: 73px;
}
</code></pre>
<p><strong>#menu .home span</strong><br />
这里设置span的背景图,也就是鼠标移上去要显示的样子,并注意top属性中20前面是一个负号.</p>
<pre lang="css">#menu .home span {
  width: 86px;
  height: 14px;
  background: url(images/home-over.gif) no-repeat;
  left: 28px;
  top: -20px;
}</pre>
<p><strong>#menu .about</strong></p>
<pre><code>
#menu .about {
  width: 131px;
  height: 51px;
  background: url(images/about.gif) no-repeat;
  left: 338px;
  top: 97px;
}
#menu .about span {
  width: 40px;
  height: 12px;
  background: url(images/about-over.gif) no-repeat;
  left: 44px;
  top: 54px;
}
</code></pre>
<p><strong>#menu .rss</strong></p>
<pre><code>
#menu .rss {
  width: 112px;
  height: 47px;
  background: url(images/rss.gif) no-repeat;
  left: 588px;
  top: 94px;
}
#menu .rss span {
  width: 92px;
  height: 20px;
  background: url(images/rss-over.gif) no-repeat;
  left: 26px;
  top: -20px;
}
</code></pre>
<p><strong>全部CSS如下</strong></p>
<pre><code>
#menu {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 774px;
  height: 210px;
  background: url(images/menu-bg.jpg) no-repeat;
  position: relative;
}
#menu span {
  display: none;
  position: absolute;
}
#menu a {
  display: block;
  text-indent: -900%;
  position: absolute;
  outline: none;
}
#menu a:hover {
  background-position: left bottom;
}
#menu a:hover span {
  display: block;
}

#menu .home {
  width: 144px;
  height: 58px;
  background: url(images/home.gif) no-repeat;
  left: 96px;
  top: 73px;
}
#menu .home span {
  width: 86px;
  height: 14px;
  background: url(images/home-over.gif) no-repeat;
  left: 28px;
  top: -20px;
}

#menu .about {
  width: 131px;
  height: 51px;
  background: url(images/about.gif) no-repeat;
  left: 338px;
  top: 97px;
}
#menu .about span {
  width: 40px;
  height: 12px;
  background: url(images/about-over.gif) no-repeat;
  left: 44px;
  top: 54px;
}

#menu .rss {
  width: 112px;
  height: 47px;
  background: url(images/rss.gif) no-repeat;
  left: 588px;
  top: 94px;
}
#menu .rss span {
  width: 92px;
  height: 20px;
  background: url(images/rss-over.gif) no-repeat;
  left: 26px;
  top: -20px;
}
</code></pre>
<h4>完成了</h4>
<p>你可以预览我做的导航，但是这个导航栏在IE6下有BUG,那就是span元素无法显示出来，如果你要修正这个BUG，那么你需要使用javascript.</p>
<p>英文原文:<a href="http://www.webdesignerwall.com/tutorials/advanced-css-menu/">http://www.webdesignerwall.com/tutorials/advanced-css-menu/</a><br />
转载请注明来自<a href="http://www.ediyang.com">eddieYang&#8217;s creative</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ediyang.com/css-watercolor-effect-website-menu/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->