<?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>Seateng Blog &#187; WEB前端开发</title>
	<atom:link href="http://blog.seateng.cn/categories/web-front/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.seateng.cn</link>
	<description>[spawn(fun()-&#62;Browser ! {self(), share(X)}end) &#124;&#124; X &#60;- [&#34;Web开发&#34;, &#34;网站构架&#34;, &#34;分布式开发&#34;]]</description>
	<lastBuildDate>Tue, 06 Dec 2011 09:25:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>chrome高亮输入框颜色调整</title>
		<link>http://blog.seateng.cn/archives/2011/06/chrome-input-area-highlighting.html</link>
		<comments>http://blog.seateng.cn/archives/2011/06/chrome-input-area-highlighting.html#comments</comments>
		<pubDate>Thu, 23 Jun 2011 03:18:49 +0000</pubDate>
		<dc:creator>Seateng</dc:creator>
				<category><![CDATA[WEB前端开发]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.seateng.cn/?p=260</guid>
		<description><![CDATA[input[type="text"]:focus, input[type="password"]:focus, textarea:focus { outline: 2px solid #6FA1D9 !important; -webkit-box-shadow:0px 0px 5px #6FA1D9 !important; } input[type="checkbox"]:focus,input[type="submit"]:focus,input[type="reset"]:focus, input[type="radio"]:focus { outline: 1px solid #6FA1D9 !important; } 参考： http://www.douban.com/group/topic/13291053/ http://fis.io/firefox-input-area-highlighting.html]]></description>
			<content:encoded><![CDATA[<p>input[type="text"]:focus, input[type="password"]:focus, textarea:focus {<br />
outline: 2px solid #6FA1D9 !important;<br />
-webkit-box-shadow:0px 0px 5px #6FA1D9 !important;<br />
} </p>
<p>input[type="checkbox"]:focus,input[type="submit"]:focus,input[type="reset"]:focus, input[type="radio"]:focus {<br />
outline: 1px solid #6FA1D9 !important;<br />
} </p>
<p>参考：<br />
<a href="http://www.douban.com/group/topic/13291053/">http://www.douban.com/group/topic/13291053/</a><br />
<a href="http://fis.io/firefox-input-area-highlighting.html">http://fis.io/firefox-input-area-highlighting.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.seateng.cn/archives/2011/06/chrome-input-area-highlighting.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用YUI Compressor自动化压缩优化</title>
		<link>http://blog.seateng.cn/archives/2009/04/auto-optimize-use-yui-compressor.html</link>
		<comments>http://blog.seateng.cn/archives/2009/04/auto-optimize-use-yui-compressor.html#comments</comments>
		<pubDate>Wed, 29 Apr 2009 08:34:15 +0000</pubDate>
		<dc:creator>Seateng</dc:creator>
				<category><![CDATA[WEB前端开发]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[yuicompressor]]></category>

		<guid isPermaLink="false">http://blog.seateng.cn/?p=130</guid>
		<description><![CDATA[负责的一个WEB项目，发布生产版本时为了优化服务器流量和客户端加载速度，每次都要手动压缩一些CSS和JS文件，十分烦人。今天得闲写了几个简单的脚本，整合在一起把整个发布过程自动化了。抄了一段压缩CSS的脚本放上来，JS文件压缩思路相仿，其他过程略。 #!/bin/sh #检查路径参数是否存在 if [ 0 = $# ] then echo &#34;Usage: $0 Minify CSS Source Dir&#34; exit fi #判断目录是否存在 if [ ! -d $1 ] then echo &#34;$1 : No such Directory&#34; exit fi #压缩CSS文件 for I in `find $1 -type f -name &#34;*.css&#34;` do echo $I java -jar /opt/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar --charset utf-8 --type css [...]]]></description>
			<content:encoded><![CDATA[<p>负责的一个WEB项目，发布生产版本时为了优化服务器流量和客户端加载速度，每次都要手动压缩一些CSS和JS文件，十分烦人。今天得闲写了几个简单的脚本，整合在一起把整个发布过程自动化了。抄了一段压缩CSS的脚本放上来，JS文件压缩思路相仿，其他过程略。</p>
<pre class="brush: bash; title: ;">
#!/bin/sh
#检查路径参数是否存在
if [ 0 = $# ]
then
    echo &quot;Usage: $0 Minify CSS Source Dir&quot;
    exit
fi
#判断目录是否存在
if [ ! -d $1 ]
then
    echo &quot;$1 : No such Directory&quot;
    exit
fi

#压缩CSS文件
for I in `find $1 -type f -name &quot;*.css&quot;`
do
    echo $I
    java -jar /opt/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar --charset utf-8 --type css $I -o $I
done
</pre>
<p>参考:<br />
<a href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI Compressor 主页</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.seateng.cn/archives/2009/04/auto-optimize-use-yui-compressor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE8 3月20日正式发布</title>
		<link>http://blog.seateng.cn/archives/2009/03/ie8-release.html</link>
		<comments>http://blog.seateng.cn/archives/2009/03/ie8-release.html#comments</comments>
		<pubDate>Fri, 20 Mar 2009 10:37:38 +0000</pubDate>
		<dc:creator>Seateng</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[WEB前端开发]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://blog.seateng.cn/?p=80</guid>
		<description><![CDATA[IE8浏览器于北京时间3月20日零时正式发布。 各大媒体头版头条，争相介绍IE8的新特性。其中一个特性是IE8 增加了对W3C Selector API的支持，Javascript 增加了两个函数 querySelector() 和 querySelectorAll() 。听都都引用了这个例子： 1 2 3 4 5 6 7 8 9 10 &#60;html&#62; &#60;body&#62; &#60;div&#62;&#60;div&#62;&#60;span&#62;InnerSpan&#60;/span&#62;&#60;/div&#62;&#60;/div&#62; &#60;div&#62;&#60;span class=&#34;myClass&#34;&#62;ClassSpan&#60;/span&#62;&#60;/div&#62; &#60;script type=&#34;text/javascript&#34;&#62; alert(document.querySelector(&#34;div div span&#34;).innerHTML); alert(document.querySelector(&#34;span.myClass&#34;).innerHTML); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62; 当你真的把这段代码，Ctrl-C Ctrl-V运行的时候你会发现IE8直接提示JS错误。不是IE8已经支持querySelector()和querySelectorAll了吗？ 原来IE8少了DOCTYPE定义就不认这两函数了。 &#60;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&#62; Jquery的强大之处正是这种Selector的写法，如果各浏览器都能实现W3C Selector API，作为Javascript的一个基本特性，那么提高性能的同时也方便了Javascript的开发者。反过来Jquery如果整合了内建的Selector，到时候在支持W3C Selector API的浏览器上将如虎添翼，性能提高的同时还能省去一大部分核心代码。 根据Robert Biggs 在blog上发布的性能测试报告，我们可以看到 IE8内建的Selector性能比Jquery快了近100倍。 几个框架的测试结果如下： [...]]]></description>
			<content:encoded><![CDATA[<p>IE8浏览器于北京时间3月20日零时正式发布。<br />
各大媒体头版头条，争相介绍IE8的新特性。其中一个特性是IE8 增加了对<a href="http://www.w3.org/TR/selectors-api/" target="_blank" title="W3C Selector API Document">W3C Selector API</a>的支持，Javascript 增加了两个函数 querySelector() 和 querySelectorAll() 。听都都引用了这个例子：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>InnerSpan<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;myClass&quot;</span>&gt;</span>ClassSpan<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
      alert(document.querySelector(&quot;div div span&quot;).innerHTML);
      alert(document.querySelector(&quot;span.myClass&quot;).innerHTML);
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>当你真的把这段代码，Ctrl-C Ctrl-V运行的时候你会发现IE8直接提示JS错误。不是IE8已经支持querySelector()和querySelectorAll了吗？<br />
原来IE8少了DOCTYPE定义就不认这两函数了。<br />
<span id="more-80"></span></p>
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>Jquery的强大之处正是这种Selector的写法，如果各浏览器都能实现W3C Selector API，作为Javascript的一个基本特性，那么提高性能的同时也方便了Javascript的开发者。反过来Jquery如果整合了内建的Selector，到时候在支持W3C Selector API的浏览器上将如虎添翼，性能提高的同时还能省去一大部分核心代码。</p>
<p>根据<a href="http://blogs.vertigo.com/personal/rbiggs/Blog/archive/2008/03/10/queryselector-ie8-vs-webkit.aspx" title="performance reports">Robert Biggs</a> 在blog上发布的性能测试报告，我们可以看到 <strong>IE8内建的Selector性能比Jquery快了近100倍</strong>。</p>
<p>几个框架的测试结果如下：<br />
全部Selector跑完<br />
IE8: 924ms<br />
Ext 2.0: 41823ms<br />
Jquery 1.2.3: 97696ms<br />
Prototype 1.6.0.2: 230289ms</p>
<p>注：IE8+ Firefox3.1+ Safari 3.1+都支持<a href="http://www.w3.org/TR/selectors-api/">W3C Selector API</a>。</p>
<p>另外IE8在向后兼容上也费尽心机。多了个兼容模式的按钮不说。<br />
还可以通过在页面head上加个：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;X-UA-Compatible&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;IE=EmulateIE7&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<p>让IE8自动用IE7兼容模式解析。如果你的应用不想针对IE8调整，那么在你的页面上加上这段试试。</p>
<p>对于UE（User Experience）来说，新版本浏览器的发布最需要关心的莫过于兼容的问题，大部分的前端开发主要考虑IE6 IE7 Firefox 兼容，从IE8正式发布的那刻起IE8便加入了主要兼容行列。前端开发要兼容的浏览器越多，成本越大这是毋庸置疑的事实。浏览器之战爽了大家苦了UE Developer。。。</p>
<p>IE8兼容模式和兼容IE7的可以看IEBlog的上的这两篇文章:<br />
<a href="http://blogs.msdn.com/ie/archive/2008/01/21/compatibility-and-ie8.aspx" target="_blank">Compatibility and IE8</a><br />
<a href="http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx" target="_blank">Introducing IE=EmulateIE7</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.seateng.cn/archives/2009/03/ie8-release.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

