<?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标准学习—小辉博客</title>
	<atom:link href="http://www.xh-css.cn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xh-css.cn</link>
	<description>学习交流web标准的知识和经验</description>
	<lastBuildDate>Tue, 07 Sep 2010 04:08:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://www.xh-css.cn/?pushpress=hub'/>
		<item>
		<title>img的 src 属性为空时尺寸在各浏览器中不一致</title>
		<link>http://www.xh-css.cn/2010/09/07/img%e7%9a%84-src-%e5%b1%9e%e6%80%a7%e4%b8%ba%e7%a9%ba%e6%97%b6%e5%b0%ba%e5%af%b8%e5%9c%a8%e5%90%84%e6%b5%8f%e8%a7%88%e5%99%a8%e4%b8%ad%e4%b8%8d%e4%b8%80%e8%87%b4/</link>
		<comments>http://www.xh-css.cn/2010/09/07/img%e7%9a%84-src-%e5%b1%9e%e6%80%a7%e4%b8%ba%e7%a9%ba%e6%97%b6%e5%b0%ba%e5%af%b8%e5%9c%a8%e5%90%84%e6%b5%8f%e8%a7%88%e5%99%a8%e4%b8%ad%e4%b8%8d%e4%b8%80%e8%87%b4/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 03:59:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[img的 src 属性为空时尺寸在各浏览器中不一致]]></category>

		<guid isPermaLink="false">http://www.xh-css.cn/?p=393</guid>
		<description><![CDATA[img的 src 属性为空时尺寸在各浏览器中不一致，这个问题你会经常的碰到，当img的路径不对的时候（img没有设置边框的时候）你会发现火狐下一片空白而ie下你能看到一个差号就像这个并且它占用的空间是固定的除非你对它设置了宽和高。于是我就在ie下火狐下火chrome下测试了他们，结果是各不相同，下面我就把得出的结论和截图发上来。




IE
Firefox
Chrome


Height
30px
18px
0px


Width
28px
0px
0px



IE的截图：

Firefox的截图：（火狐3.6.8版本，有点意思不设置边框显示的是0如下图，设置了边框显示的有高度没有宽度）


chrome的截图：

]]></description>
			<content:encoded><![CDATA[<p>img的 src 属性为空时尺寸在各浏览器中不一致，这个问题你会经常的碰到，当img的路径不对的时候（img没有设置边框的时候）你会发现火狐下一片空白而ie下你能看到一个差号就像这个<a href="http://www.xh-css.cn/wp-content/uploads/2010/09/cha.jpg"><img class="alignnone size-full wp-image-394" title="cha" src="http://www.xh-css.cn/wp-content/uploads/2010/09/cha.jpg" alt="" width="41" height="43" /></a>并且它占用的空间是固定的除非你对它设置了宽和高。于是我就在ie下火狐下火chrome下测试了他们，结果是各不相同，下面我就把得出的结论和截图发上来。</p>
<table style="width: 400px;border:1px solid #ccc;">
<tbody>
<tr>
<th></th>
<th>IE</th>
<th>Firefox</th>
<th>Chrome</th>
</tr>
<tr>
<th>Height</th>
<td>30px</td>
<td>18px</td>
<td>0px</td>
</tr>
<tr>
<th>Width</th>
<td>28px</td>
<td>0px</td>
<td>0px</td>
</tr>
</tbody>
</table>
<p>IE的截图：<br />
<a href="http://www.xh-css.cn/wp-content/uploads/2010/09/ie.jpg"><img class="alignnone size-full wp-image-395" title="ie" src="http://www.xh-css.cn/wp-content/uploads/2010/09/ie.jpg" alt="" width="385" height="261" /></a><br />
Firefox的截图：（火狐3.6.8版本，有点意思不设置边框显示的是0如下图，设置了边框显示的有高度没有宽度）<br />
<a href="http://www.xh-css.cn/wp-content/uploads/2010/09/ff.jpg"><img class="alignnone size-full wp-image-396" title="ff" src="http://www.xh-css.cn/wp-content/uploads/2010/09/ff.jpg" alt="" width="270" height="198" /></a><br />
<a href="http://www.xh-css.cn/wp-content/uploads/2010/09/fff.jpg"><img class="alignnone size-full wp-image-397" title="fff" src="http://www.xh-css.cn/wp-content/uploads/2010/09/fff.jpg" alt="" width="280" height="199" /></a><br />
chrome的截图：<br />
<a href="http://www.xh-css.cn/wp-content/uploads/2010/09/chrome.jpg"><img class="alignnone size-full wp-image-398" title="chrome" src="http://www.xh-css.cn/wp-content/uploads/2010/09/chrome.jpg" alt="" width="214" height="178" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xh-css.cn/2010/09/07/img%e7%9a%84-src-%e5%b1%9e%e6%80%a7%e4%b8%ba%e7%a9%ba%e6%97%b6%e5%b0%ba%e5%af%b8%e5%9c%a8%e5%90%84%e6%b5%8f%e8%a7%88%e5%99%a8%e4%b8%ad%e4%b8%8d%e4%b8%80%e8%87%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6 中最大最小宽度和高度css 高度控制</title>
		<link>http://www.xh-css.cn/2010/09/07/ie6-%e4%b8%ad%e6%9c%80%e5%a4%a7%e6%9c%80%e5%b0%8f%e5%ae%bd%e5%ba%a6%e5%92%8c%e9%ab%98%e5%ba%a6css-%e9%ab%98%e5%ba%a6%e6%8e%a7%e5%88%b6/</link>
		<comments>http://www.xh-css.cn/2010/09/07/ie6-%e4%b8%ad%e6%9c%80%e5%a4%a7%e6%9c%80%e5%b0%8f%e5%ae%bd%e5%ba%a6%e5%92%8c%e9%ab%98%e5%ba%a6css-%e9%ab%98%e5%ba%a6%e6%8e%a7%e5%88%b6/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 02:44:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[IE6 中最大最小宽度和高度css 高度控制]]></category>

		<guid isPermaLink="false">http://www.xh-css.cn/?p=391</guid>
		<description><![CDATA[
最小宽度
min-width:200px;width:auto !important;width:200px;
最大宽度
width:auto !important;width:200px;max-width:200px;overflow:hidden;
最小高度
min-height:200px;height:auto !important;height:200px;
最大高度
height:auto !important;height:200px;max-height:200px;overflow:hidden;


]]></description>
			<content:encoded><![CDATA[<pre style="background: none repeat scroll 0% 0% #cccccc; width: 580px; height: auto;"><code>
最小宽度
min-width:200px;width:auto !important;width:200px;
最大宽度
width:auto !important;width:200px;max-width:200px;overflow:hidden;
最小高度
min-height:200px;height:auto !important;height:200px;
最大高度
height:auto !important;height:200px;max-height:200px;overflow:hidden;
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.xh-css.cn/2010/09/07/ie6-%e4%b8%ad%e6%9c%80%e5%a4%a7%e6%9c%80%e5%b0%8f%e5%ae%bd%e5%ba%a6%e5%92%8c%e9%ab%98%e5%ba%a6css-%e9%ab%98%e5%ba%a6%e6%8e%a7%e5%88%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery简单的列表滚动效果</title>
		<link>http://www.xh-css.cn/2010/09/06/jquery%e7%ae%80%e5%8d%95%e7%9a%84%e5%88%97%e8%a1%a8%e6%bb%9a%e5%8a%a8%e6%95%88%e6%9e%9c/</link>
		<comments>http://www.xh-css.cn/2010/09/06/jquery%e7%ae%80%e5%8d%95%e7%9a%84%e5%88%97%e8%a1%a8%e6%bb%9a%e5%8a%a8%e6%95%88%e6%9e%9c/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 07:25:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery简单的列表滚动效果]]></category>

		<guid isPermaLink="false">http://www.xh-css.cn/?p=388</guid>
		<description><![CDATA[使用jquery实现一些列表的滚动有很多的方法，你可以使用animate方法，到网上搜到的大都是使用animate方法的，当然也可以使用别的方法，今天我们介绍的这个方法我感觉也比前一种方法更容易理解！思路就是首先获取到列表中的第一个，然后把它隐藏在隐藏的同时克隆一份放到列表容器中，这时候删除这个列表。而这个时候原来的第二条列表就变成第一条了，设置循环就可以一直执行下去。好了用语言描述有时候感觉很不给力，所以还是看例子！


&#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;滚动新闻&#60;/title&#62;
&#60;script type=&#34;text/javascript&#34; src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34;&#62;
function newsScroll(){
	$(function(){
		$(&#34;.newsList li:first&#34;).hide('slow',function(){
		$(this).clone().appendTo($(this).parent()).show('slow');
		$(this).remove();
		});
	});
};
$(document).ready(function() {
	var myar = setInterval('newsScroll(&#34;.newsList li&#34;)', 2000)
	$(&#34;.newsList li&#34;).hover(function() { clearInterval(myar); }, function() { myar = setInterval('newsScroll(&#34;.newsList li&#34;)', 2000) });
});
&#60;/script&#62;
&#60;style type=&#34;text/css&#34;&#62;
#box { height:300px; width:300px; margin:0 auto; border:1px solid orange; line-height:2; }
ul,li { list-style:none;}
.notice { width:500px; margin:10px auto; line-height:1.6; font-size:18px; [...]]]></description>
			<content:encoded><![CDATA[<p>使用jquery实现一些列表的滚动有很多的方法，你可以使用animate方法，到网上搜到的大都是使用animate方法的，当然也可以使用别的方法，今天我们介绍的这个方法我感觉也比前一种方法更容易理解！思路就是首先获取到列表中的第一个，然后把它隐藏在隐藏的同时克隆一份放到列表容器中，这时候删除这个列表。而这个时候原来的第二条列表就变成第一条了，设置循环就可以一直执行下去。好了用语言描述有时候感觉很不给力，所以还是看例子！</p>
<div class="runcode">
<p><textarea name="runcode" style="height:245px;width:600px;font-size:12px" class="runcode_text" id="runcode_mhdYxP">
&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;滚动新闻&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function newsScroll(){
	$(function(){
		$(&quot;.newsList li:first&quot;).hide('slow',function(){
		$(this).clone().appendTo($(this).parent()).show('slow');
		$(this).remove();
		});
	});
};
$(document).ready(function() {
	var myar = setInterval('newsScroll(&quot;.newsList li&quot;)', 2000)
	$(&quot;.newsList li&quot;).hover(function() { clearInterval(myar); }, function() { myar = setInterval('newsScroll(&quot;.newsList li&quot;)', 2000) });
});
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
#box { height:300px; width:300px; margin:0 auto; border:1px solid orange; line-height:2; }
ul,li { list-style:none;}
.notice { width:500px; margin:10px auto; line-height:1.6; font-size:18px; color:orange;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;notice&quot;&gt;
这中写法很容易理解，并且你可以自己修改切换到方式，比如你可以把show和hide换成fadeIn和fadeOut或者是slideDown和slideUp都可以，自己不会写插件所以就没有封装！
&lt;/div&gt;
&lt;div id=&quot;box&quot;&gt;
  &lt;ul class=&quot;newsList&quot;&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
    &lt;li&gt;web标准学习-www.xh-css.cn&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_mhdYxP');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_mhdYxP');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_mhdYxP','runcode_mhdYxP');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p>你还可以把show和hide换成fadeIn和fadeOut或者是slideDown和slideUp都可以，自己动手试试吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xh-css.cn/2010/09/06/jquery%e7%ae%80%e5%8d%95%e7%9a%84%e5%88%97%e8%a1%a8%e6%bb%9a%e5%8a%a8%e6%95%88%e6%9e%9c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTF-8编码下导致的空行问题</title>
		<link>http://www.xh-css.cn/2010/09/05/utf-8%e7%bc%96%e7%a0%81%e4%b8%8b%e5%af%bc%e8%87%b4%e7%9a%84%e7%a9%ba%e8%a1%8c%e9%97%ae%e9%a2%98/</link>
		<comments>http://www.xh-css.cn/2010/09/05/utf-8%e7%bc%96%e7%a0%81%e4%b8%8b%e5%af%bc%e8%87%b4%e7%9a%84%e7%a9%ba%e8%a1%8c%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 09:27:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.xh-css.cn/?p=386</guid>
		<description><![CDATA[UTF-8签名(UTF-8 signature)也叫做BOM(Byte Order Mark)，是UTF编码方案里用于标识编码的标准标记。
如果多个文件设置了签名，在二进制流中就会包含多个UTF-8签名，而IE是无法识别多个UTF-8签名的，所以用一个空行来代替，在某些程序处理中还会出现一个类似“诺”的字符。
在UCS 编码中有一个叫做”ZERO WIDTH NO-BREAK SPACE”的字符，它的编码是 FEFF。而FFFE在UCS中是不存在的字符，所以不应该出现在实际传输中。UCS规范建议我们在传输字节流前，先传输 字符”ZERO WIDTH NO-BREAK SPACE”。这样如果接收者收到FEFF，就表明这个字节流是Big-Endian的；如果收到FFFE，就表明这个字节流是Little- Endian的。
因此字符[ZERO WIDTH NO-BREAK SPACE]又被称作BOM。
详情: W3C官方关于这个问题的说明
解决方法：
去掉UTF-8文件的签名，EditPlus和Dreamweaver中均有相应的选项。
以EditPlus为例：
进入 Tools->Preferences->Files，在UTF-8 signature选项中选择“Always remove signature”，重新保存文件即可。
如果模板采用包含的方法包含多个utf8文件需要用ultraedit保存时另存为功能，选择utf8 无bom格式保存即可。
另外，如果中文页面在html head标记中将title标记放在前面会导致页面空白。
所以utf8页面应该使用标准顺序
]]></description>
			<content:encoded><![CDATA[<p>UTF-8签名(UTF-8 signature)也叫做BOM(Byte Order Mark)，是UTF编码方案里用于标识编码的标准标记。<br />
如果多个文件设置了签名，在二进制流中就会包含多个UTF-8签名，而IE是无法识别多个UTF-8签名的，所以用一个空行来代替，在某些程序处理中还会出现一个类似“诺”的字符。</p>
<p>在UCS 编码中有一个叫做”ZERO WIDTH NO-BREAK SPACE”的字符，它的编码是 FEFF。而FFFE在UCS中是不存在的字符，所以不应该出现在实际传输中。UCS规范建议我们在传输字节流前，先传输 字符”ZERO WIDTH NO-BREAK SPACE”。这样如果接收者收到FEFF，就表明这个字节流是Big-Endian的；如果收到FFFE，就表明这个字节流是Little- Endian的。</p>
<p>因此字符[ZERO WIDTH NO-BREAK SPACE]又被称作BOM。<br />
详情: W3C官方关于这个问题的说明</p>
<p>解决方法：<br />
去掉UTF-8文件的签名，EditPlus和Dreamweaver中均有相应的选项。</p>
<p>以EditPlus为例：<br />
进入 Tools->Preferences->Files，在UTF-8 signature选项中选择“Always remove signature”，重新保存文件即可。</p>
<p>如果模板采用包含的方法包含多个utf8文件需要用ultraedit保存时另存为功能，选择utf8 无bom格式保存即可。</p>
<p>另外，如果中文页面在html head标记中将title标记放在前面会导致页面空白。<br />
所以utf8页面应该使用标准顺序</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xh-css.cn/2010/09/05/utf-8%e7%bc%96%e7%a0%81%e4%b8%8b%e5%af%bc%e8%87%b4%e7%9a%84%e7%a9%ba%e8%a1%8c%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
