<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<lastBuildDate>Sun, 29 Jul 2007 00:56:31 +0800</lastBuildDate>
<title>Css - czBin's Blog</title>
<link>http://www.czBin.cn/Css.xml</link>
<description>czBin.cn -> Css的技术文章</description>
<item>
<pubDate>Sun, 29 Jul 2007 00:56:31 +0800</pubDate>
<title>纯在CSS里定义input样式，不添加任何多余的HTML代码</title>
<link>http://www.czBin.cn/CSS.Input.001.php</link>
<description><![CDATA[我们在写CSS的时候经常会遇到这种情况：<br />
&lt;input type=&quot;text&quot;/&gt;<br />
&lt;input type=&quot;submit&quot; value=&quot;提交&quot;/&gt;<br />
一半来说，我们都会赋予text和input不同的id或者class来分别定义输入框和按钮的样式，例如：<br />
&lt;input type=&quot;text&quot; id=&quot;text&quot;/&gt;<br />
&lt;input type=&quot;submit&quot; value=&quot;提交&quot; id=&quot;submit&quot;/&gt;<br />
但是，如果我们只想把网页中所有的text以及submit都分别定义为相同的样式，那么，我们可以用下面的方法来实现：<br />
&lt;style type=&quot;text/css&quot;&gt;<br />
input { width:expression((type==&quot;text&quot;)?350:80); }<br />
input[type=&quot;text&quot;] { width:350px; }<br />
input[type=&quot;submit&quot;] { width:80px; }<br />
&lt;/style&gt;<br />
&lt;input type=&quot;text&quot;/&gt;<br />
&lt;input type=&quot;submit&quot; value=&quot;提交&quot;/&gt;<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/CSS.Input.001.php</guid>   
</item>
<item>
<pubDate>Sun, 22 Jul 2007 14:42:23 +0800</pubDate>
<title>Css中为对象应用样式的三种方法：id,class,style</title>
<link>http://www.czBin.cn/Css.Id.Class.Style.php</link>
<description><![CDATA[我们可以使用三种方法来给一个对象(例如div,span,table)应用样式。<br />
<br />
1：使用#定义样式，并使用id为对象应用样式。<br />
......<br />
2：使用.定义样式，并使用class为对象应用样式。<br />
......<br />
3：不定义样式，直接使用style为对象应用样式。<br />
......<br />
使用这三种方法所产生的效果是相同的，但我们需要注意的是，这三种方法间的优先级问题。<br />
如果我们对一个对象同时使用上述三种方法定义样式，会怎么样呢？<br />
比如我们先定义一个#STYLE { font-size:12px; }再定义一个.STYLE { font-size:14px; }最后在对象上使用style=&quot;font-size:16px;&quot;代码如下：<br />
......<br />
这种情况下，浏览器会根据三种方式的优先级，即style&gt;id&gt;class来为对象应用样式。上述例子中，div中的文字会显示为16px大小。<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/Css.Id.Class.Style.php</guid>   
</item>
<item>
<pubDate>Tue, 03 Jul 2007 17:13:02 +0800</pubDate>
<title>兼容Ie6,Ie7,Firefox的办法，也许是笨办法，但起码不用Hack了</title>
<link>http://www.czBin.cn/Css.Ie67.Firefox.php</link>
<description><![CDATA[去年还在郁闷Ie6与Firefox(火狐)兼容性的问题，今年又多出了个Ie7。并且最让人接受不了的是，同样的代码在Ie6和Ie7下，竟然会出现完全不同的效果，不知道微软是怎么想的。Hack是邪恶的，而且有很大部分的Hack不只是像用clear both来闭合浮动元素那么简单。动不动的负margin，再加上一堆冷门的CSS(但正因为Hack，使这些样式热得不能再热)，别说是新手，就算老手也会头大。花了九牛二虎之力好不容易把Hack弄懂了，那毕竟也只是一个Hack。<br />
所以，我们还是用比较古老的办法来解决Ie6,Ie7,FireFox的兼容问题吧。<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/Css.Ie67.Firefox.php</guid>   
</item>
<item>
<pubDate>Sat, 23 Jun 2007 17:33:02 +0800</pubDate>
<title>用CSS在一个网页里定义几种不同链接</title>
<link>http://www.czBin.cn/CSS.Link.different.php</link>
<description><![CDATA[定义CSS:<br />
a.linkOne { color:black; }<br />
a.linkTwo { color:red; }<br />
<br />
使用CSS:<br />
为链接加上class=&quot;linkOne&quot;后，链接为黑色<br />
加上class=&quot;linkTwo&quot;后，链接为红色<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/CSS.Link.different.php</guid>   
</item>
<item>
<pubDate>Sun, 10 Jun 2007 17:53:11 +0800</pubDate>
<title>让鼠标经过div,ul,li,tr,td等容器时，背景颜色改变</title>
<link>http://www.czBin.cn/onMouseOver.001.php</link>
<description><![CDATA[非IE的话，使用:hover就可以，例如:<br />
<br />
#d1:hover {background:#FF0000}<br />
......<br />
&lt;div id=&quot;d1&quot;&gt;www.czbin.cn&lt;/div&gt;<br />
但&quot;伟大的&quot;Ie并不支持这样写...<br />
只好通过定义onMouseOver事件和onMouseOut了,例如:<br />
<br />
&lt;div onMouseOver=&quot;this.style.backgroundColor='#FF0000'&quot; onMouseOut=&quot;this.style.backgroundColor='#FFFFFF'&quot;&gt;<br />
<br />
......<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/onMouseOver.001.php</guid>   
</item>
<item>
<pubDate>Sun, 10 Jun 2007 16:53:22 +0800</pubDate>
<title>在IE浏览器下,Ul的Margin竟然传给了LI...</title>
<link>http://www.czBin.cn/Margin.ulli.001.php</link>
<description><![CDATA[今天被一个问题郁闷了半个多小时,又是IE...我也服了!<br />
<br />
开始代码是这样的<br />
<br />
......<br />
<br />
&lt;div&gt;<br />
&lt;ul id=&quot;m&quot;&gt;<br />
&lt;li&gt;123&lt;/li&gt;<br />
&lt;li&gt;123&lt;/li&gt;<br />
&lt;li&gt;123&lt;/li&gt;<br />
&lt;li&gt;123&lt;/li&gt;<br />
&lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
<br />
......<br />
<br />
IE下浏览，每个LI竟然都有80的Top Margin....<br />
<br />
......<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/Margin.ulli.001.php</guid>   
</item>
<item>
<pubDate>Sat, 09 Jun 2007 23:36:35 +0800</pubDate>
<title>在 CSS 中关于字体处理效果的思考</title>
<link>http://www.czBin.cn/Css.Font.001.php</link>
<description><![CDATA[字体的处理在网页设计中无论怎么强调也不为过，毕竟网页使用来传递信息的，而最经典最直接的信息传递方式就是文字，所以，了解一点字体的基本知识对于设计来说还是非常重要的。<br />
<br />
中文和英文的最大区别就是中文是方块字，英文是拼音文字，这对字体的处理的影响是巨大的。看看下面的图示就会发现，英文字体里的那些变化在中文字体里都弱化了。<br />
<br />
作为中文的读者，习惯性的接受方块形状做为阅读的单元，其实对于眼睛来说，这是一种容易疲劳的方式，阅读的时候你的视线实际上是跟随整行文字的外形。看看这个例子。<br />
<br />
NOW I VE TRIED TO TALK TO YOU AND MAKE YOU UNDERSTAND<br />
<br />
Now I ve tried to talk to you and make you understand<br />
<br />
哪一行更容易读呢？<br />
<br />
......<br />
<br />
最好使用左对齐，尤其要避免使用左右对齐，除非你有一个特殊的设计目的，左对齐时右侧的不对齐正是为了阅读的方便，右侧的变化对你的视力是一个帮助，它借助变化告诉你的眼睛可以换行了。<br />
行间距？<br />
<br />
......<br />
<br />
很特殊的用途，对中文来说这两者应该是相同的。这个设定的本身就是为了解决某些字体设计上缺陷，来增加文字的可读性。<br /><br /><br />]]></description>
<category>Css</category> 
<guid isPermaLink="true">http://www.czBin.cn/Css.Font.001.php</guid>   
</item>
</channel>
</rss>