<?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>CSSer课堂</title>
	<atom:link href="http://blog.owncsser.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.owncsser.com</link>
	<description>我们是师徒六人组，以Design, CSS, JS, web标准化为爱好。</description>
	<lastBuildDate>Fri, 21 Jan 2011 06:32:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>多终端样式适配策略[PDF]</title>
		<link>http://blog.owncsser.com/mobile-adaptive-wap20/</link>
		<comments>http://blog.owncsser.com/mobile-adaptive-wap20/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 06:32:21 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[WAP&WML]]></category>
		<category><![CDATA[html Validator]]></category>
		<category><![CDATA[MOBILE]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=241</guid>
		<description><![CDATA[移动运营商白名单是获取的手机UA的前提，根据UA信息拼凑一个适合终端显示的网页，这样可以精细化页面表现，并对不同的终端做更佳的表现或者更适合的页面表现... ]]></description>
			<content:encoded><![CDATA[<p>2011年了，总结下2010年WAP开发的一些经验积累。<br />
并提供PDF供大家下载，希望我的手机终端的wap开发能对你有用。</p>
<p><a href='http://blog.owncsser.com/wp-content/uploads/2011/01/mobile_adaptive_wap.zip'>手机多终端样式适配策略</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/mobile-adaptive-wap20/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>可以穿越的Firebug跨浏览器的调试方法</title>
		<link>http://blog.owncsser.com/firebug-crossing/</link>
		<comments>http://blog.owncsser.com/firebug-crossing/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 06:18:28 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Fire Bug]]></category>
		<category><![CDATA[Fire Fox]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=238</guid>
		<description><![CDATA[跨浏览器的firebug调试方法，让你在FF之外也可以使用firebug调试页面... ]]></description>
			<content:encoded><![CDATA[<p>firebug可以跨浏览器进行调试，支持IE6+,ff,opera。</p>
<p>firebug很好用，但是IE下可以调用firebug的方法更让你觉得给力。方法简单：</p>
<div class="runcode">
<p><textarea name="runcode" style="overflow-y:visible;width:600px;font-size:12px" class="runcode_text" id="runcode_850Bn8"> &lt;script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'&gt;&lt;/script&gt;</textarea></p>
<script type="text/javascript">function changeTsize(){document.getElementById("runcode_850Bn8").style.height = document.getElementById("runcode_850Bn8").scrollHeight + "px";}window.setTimeout(changeTsize,0);</script><p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_850Bn8');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_850Bn8');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_850Bn8','runcode_850Bn8');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p>添加以上代码到你的页面里面。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/firebug-crossing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>手机视觉与用户体验-网易WAP改版谈</title>
		<link>http://blog.owncsser.com/mobile-vision-and-ue/</link>
		<comments>http://blog.owncsser.com/mobile-vision-and-ue/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 03:05:15 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[WAP&WML]]></category>
		<category><![CDATA[MOBILE]]></category>
		<category><![CDATA[wap]]></category>
		<category><![CDATA[wap2.0]]></category>
		<category><![CDATA[WML1.0]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=225</guid>
		<description><![CDATA[网易WAP改版后字体的视觉表现，谈WAP网页的字体处理方法及wap开发经验指南... ]]></description>
			<content:encoded><![CDATA[<p>了解外界世界及在地铁中打发时间的唯一好办法，开UC看新闻。新闻的链接先点开一堆，新浪，网易，凤凰，搜狐，然后挨个看头条。</p>
<p>以前在看新闻，觉得最耐看，最给力的还是网易wap站，总会有意想不到的新闻焦点不同于其他新闻媒体。可自从丫改版了，更换了貌似看起来很绚丽的样式之后，我不看了，因为我看到的字体更小，眼睛更加吃力，长时间会有疼痛的感觉。</p>
<p>为了眼睛，我发过反馈意见给网易，临了还留了邮箱，以便联系。不过貌似不怎么搭理我这个忠实的用户，得！以后可以绕行，避免为我的眼睛弄一个隔着玻璃看。</p>
<blockquote><p>1.基于手机屏幕有限度的尺寸限制，应该让网页能按照用户（手机用户）设定的默认字体尺寸来显示，这样也是延续用户基本的个人需求体验。<br />
2.新闻类的手机网页更不能强制千篇一律的给用户一个字体尺寸，而阻止用户设定查看多文本的内容的默认字体尺寸习惯。<br />
3.尊重用户反馈，即使你觉得他可以忽略不计。</p></blockquote>
<p>在WAP网站开发时，字体一定要斟酌而定，避免发生用户不能设置字体大小，设置的字体类型与期望不同的情况出现。方法很简单：</p>
<blockquote><p>1.设置相对字体不设置绝对（px）字体<br />
2.不要画蛇添足设置字体类型<br />
3.触屏手机应单独处理（Android/iPhone/iPod/iPad）字体尺寸，按钮大小</p></blockquote>
<p>具体实现方式：<br />
font-size:medium;<br />
即就是，设置中等字体。（用户手机的显示一般为大，中，小）这样可以沿用用户的手机视觉习惯。</p>
<p>一个实用的样式设置例子：<br />
<code>html,body,p,form,div,table,textarea,input{font-size:medium;vertical-align:middle}/* 千万不要省心而用[*]处理 */<br />
body{background:#5e99ce;color:#414141;padding:1px}<br />
form{border:0;margin:0;padding:1px}<br />
img{border:0;vertical-align:middle}<br />
textarea{width:95%;}/* 长文本输入框在设置 100% 后很多会溢出 */</code></p>
<p>另外需要注意的两个重要的Meta标签：</p>
<blockquote><p>meta name=&#8221;viewport&#8221; content=&#8221;width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=2.0&#8243;</p></blockquote>
<blockquote><p>meta name=&#8221;MobileOptimized&#8221; content=&#8221;240&#8243;</p></blockquote>
<p>这个很重要，具体的用法，还是多搜索下，多看看，加深理解。</p>
<p>有什么要说，敬请留言：</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/mobile-vision-and-ue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jquery之input提示文字替换效果</title>
		<link>http://blog.owncsser.com/jquery_input_replacement/</link>
		<comments>http://blog.owncsser.com/jquery_input_replacement/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 08:17:19 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=223</guid>
		<description><![CDATA[Jquery易用的input输入框替换文本效果插... ]]></description>
			<content:encoded><![CDATA[<p>jquery用于input提示文本的效果，简单实用，易于扩展。</p>
<div class="runcode">
<p><textarea name="runcode" style="height:320px;width:600px;font-size:12px" class="runcode_text" id="runcode_65PESk">
&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;default input text&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function textReplacement(input){
	var originalvalue = input.val();
	input.focus( function(){
		if( $.trim(input.val()) == originalvalue ){ input.val(''); }
	});
	input.blur( function(){
		if( $.trim(input.val()) == '' ){ input.val(originalvalue); }
	});
}
$(function(){
	textReplacement($('#uid'));
})
&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
body{font-size:76%;}
input{font-size:1em;border-width:1px;padding:3px;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;label for=&quot;uid&quot;&gt;用户名：&lt;/label&gt;
&lt;input type=&quot;text&quot; value=&quot;请输入用户名&quot; id=&quot;uid&quot; /&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_65PESk');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_65PESk');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_65PESk','runcode_65PESk');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/jquery_input_replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WML2.0经验交流之开发利器</title>
		<link>http://blog.owncsser.com/wml20-development-weapon/</link>
		<comments>http://blog.owncsser.com/wml20-development-weapon/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 02:36:27 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[WAP&WML]]></category>
		<category><![CDATA[Web Standard]]></category>
		<category><![CDATA[WML]]></category>
		<category><![CDATA[wml20]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=216</guid>
		<description><![CDATA[确保我们的页面顺利的被浏览器所解析并正常显示手机浏览器的页面适配是个挑剔的活，需要适配的手机浏览器千奇百怪.所以,我们必须精细的对待页面代码,只有这样才能... ]]></description>
			<content:encoded><![CDATA[<p>    手机浏览器的页面适配是个挑剔的活，需要适配的手机浏览器千奇百怪.所以,我们必须精细的对待页面代码,只有这样才能让我们的页面顺利的被浏览器所解析并正常显示.</p>
<p>这里便引出一个页面书写基本要求：<br />
1.单个标签必须闭合<br />
2.成对标签必须闭合<br />
3.成对标签不允许无内容出现<br />
4.嵌套规则必须遵循</p>
<p>    而需要做到以上几点,对于在书写页面以及调试过程中,便需要借助一些验证插件来调试我们所写的页面,那谁谁说:”科学技术是第一生产力”.我得瑟下”懂得借助工具可以提升生产力”.不废话,推荐的页面调试及组合:<br />
Fire Fox① +WMLbrowser② + HTML VALIDATOR③ + Fire Bug④<br />
1) Fire Fox不用介绍了<br />
2) WMLbrowser 用来使用Fire Fox浏览wml格式手机网页<br />
3) HTML Validator 主要用来验证页面标签,网址 <a href="http://users.skynet.be/mgueury/mozilla/">http://users.skynet.be/mgueury/mozilla/</a><br />
4)	Fire Bug 这个工具很强大.具体查看<a href="http://getfirebug.com/">http://getfirebug.com/</a></p>
<p>以上浏览器以及三个组件便是网页调试的组合利器.点击下载<a href="http://blog.owncsser.com/wp-content/uploads/2010/03/wml20_Development-weapon.doc">wml20_Development-weapon.DOC</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/wml20-development-weapon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WML2.0确保通行的CSS验证标准</title>
		<link>http://blog.owncsser.com/wml20-css-standard/</link>
		<comments>http://blog.owncsser.com/wml20-css-standard/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 10:20:37 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[WAP&WML]]></category>
		<category><![CDATA[Web Standard]]></category>
		<category><![CDATA[DTD声明]]></category>
		<category><![CDATA[Mobile CSS验证]]></category>
		<category><![CDATA[手机网页]]></category>
		<category><![CDATA[手机网页字体大小]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=209</guid>
		<description><![CDATA[手机网页格式发布前必须验证CSS及HTML标签... ]]></description>
			<content:encoded><![CDATA[<p>细节决定成本，确实，你不服，就是不行！</p>
<p>手机测试页面时候遇到非常刁难的问题，然后百思不得其解，去使用<a href="http://jigsaw.w3.org/css-validator/validator.html.zh-cn#validate_by_input">CSS验证</a>了下。<br />
如图：<br />
<img src="http://blog.owncsser.com/wp-content/uploads/2010/03/wmlcss.png" alt="wmlcss" title="wmlcss" width="570" height="534" class="aligncenter size-full wp-image-213" /></p>
<p>验证结果发现，使用手机网页格式的DTD声明，不支持定义【a:hover】，从而导致异常错误。</p>
<div class="runcode">
<p><textarea name="runcode" style="overflow-y:visible;width:600px;font-size:12px" class="runcode_text" id="runcode_5UMe_L">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&quot; &quot;http://www.wapforum.org/DTD/xhtml-mobile10.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
</textarea></p>
<script type="text/javascript">function changeTsize(){document.getElementById("runcode_5UMe_L").style.height = document.getElementById("runcode_5UMe_L").scrollHeight + "px";}window.setTimeout(changeTsize,0);</script><p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_5UMe_L');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_5UMe_L');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_5UMe_L','runcode_5UMe_L');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p>得出一个结论：</p>
<ol>
<li>DTD声明是有用的</li>
<li>CSS应根据DTD声明类型去验证（必须的）</li>
<li>手机字体大小建议使用相对字体（否则页面适配很麻烦）</li>
<li>手机网页最好内嵌style（不要使用外链）</li>
<li>结合HTML Validator对页面进行验证，见<a href="http://blog.owncsser.com/wml20-development-weapon/">WML2.0经验交流之开发利器</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/wml20-css-standard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解释：UTF-8编码下导致的空行问题</title>
		<link>http://blog.owncsser.com/utf-8-space-line/</link>
		<comments>http://blog.owncsser.com/utf-8-space-line/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 08:47:26 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[Web Standard]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[页面顺序]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=204</guid>
		<description><![CDATA[UTF-8编码格式IE下引起的空行问题诠释... ]]></description>
			<content:encoded><![CDATA[<p>文章来源：<a href="http://www.cnblogs.com/darkangle/archive/2009/02/17/1392682.html">UTF-8空行产生的原因</a></p>
<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 />
详情: <a href="http://www.w3.org/International/questions/qa-utf8-bom">W3C官方关于这个问题的说明</a></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://blog.owncsser.com/utf-8-space-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>不增加服务器处理负担的圆角头像CSS解决方案</title>
		<link>http://blog.owncsser.com/mellowness-avatar/</link>
		<comments>http://blog.owncsser.com/mellowness-avatar/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 02:10:53 +0000</pubDate>
		<dc:creator>San</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[Web Standard]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[CSS Sprite]]></category>
		<category><![CDATA[face]]></category>
		<category><![CDATA[圆角头像]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=196</guid>
		<description><![CDATA[减少服务器开销、负担的CSS方式圆角头像处理方案，浏览器兼容性佳... ]]></description>
			<content:encoded><![CDATA[<p>本着不增加服务器开销，负担的原则，考虑使用CSS来处理用户头像，相册等。<br />
圆角头像，是可以通过CSS技巧来实现的，并且浏览器兼容性佳！</p>
<p>看看效果图片如何？<br />
<img src="http://blog.owncsser.com/wp-content/uploads/2010/01/3face.jpg" alt="3face" title="3face" width="188" height="254" class="aligncenter size-full wp-image-197" /></p>
<p>看着还行，对吧?</p>
<p>一下为运行代码：</p>
<div class="runcode">
<p><textarea name="runcode" style="height:200px;width:600px;font-size:12px" class="runcode_text" id="runcode_i4ypDz">
&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;style type=&quot;text/css&quot;&gt;
body{
	background:#000;
	color:#fff;
}
.avatar{
	padding:15px;
	background:#fff;
}
/* face */
.face1,.face2,.face3{
	position:relative;/* 相对定位，给em一个定位基线 */
}
/* face img */
.face1 img,.face2 img,.face3 img{
	padding:3px;
}
/* face em */
.face1 em,.face2 em,.face3 em{
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
}
/* face 1 */
.face1{
	width:126px;
	height:126px;
}
.face1 em{
	background:url(http://blog.owncsser.com/wp-content/uploads/2010/01/face1.png) no-repeat;
}
/* face 2 */
.face2{
	width:54px;
	height:54px;
}
.face2 em{
	background:url(http://blog.owncsser.com/wp-content/uploads/2010/01/face2.png) no-repeat;
}
/* face 3 */
.face3{
	width:36px;
	height:36px;
}
.face3 em{
	background:url(http://blog.owncsser.com/wp-content/uploads/2010/01/face3.png) no-repeat;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;avatar&quot;&gt;
    &lt;div class=&quot;face1&quot;&gt;
        &lt;img src=&quot;http://static1.139js.com/system/avatar/19642548/200/1263120798344124.jpg&quot; width=&quot;120&quot; height=&quot;120&quot; /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;
    &lt;/div&gt;
    &lt;div class=&quot;face2&quot;&gt;
        &lt;img src=&quot;http://static1.139js.com/system/avatar/19642548/48x48/1263120798344124.jpg&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;
    &lt;/div&gt;
    &lt;div class=&quot;face3&quot;&gt;
        &lt;img src=&quot;http://static1.139js.com/system/avatar/19642548/48x48/1263120798344124.jpg&quot; width=&quot;30&quot; height=&quot;30&quot; /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;
    &lt;/div&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_i4ypDz');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_i4ypDz');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_i4ypDz','runcode_i4ypDz');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p>在以上的图片圆角框处理中，有一个技巧。<br />
图片圆角框上下左右都会预留一个空间，而这个尺寸恰好是头像图片中CSS的padding值。<br />
<code>/* face img */<br />
.face1 img,.face2 img,.face3 img{<br />
	padding:3px;<br />
}</code><br />
这样处理后，方便让圆角框正好遮住目标图片。</p>
<p>似乎上面的例子中，还可以在此减少服务器的开销，对。可以把圆角框拼接起来，成为一张图片。原理<a href="http://search.blueidea.com/?q=CSS+Sprite&#038;tr=bbs">CSS Sprite</a>,运行一下第二个优化方案。</p>
<div class="runcode">
<p><textarea name="runcode" style="height:200px;width:600px;font-size:12px" class="runcode_text" id="runcode_koAtsZ">
&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;圆润头像 2&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
body{
	background:#000;
	color:#fff;
}
.avatar{
	padding:15px;
	background:#fff;
}
/* face 相对定位，给em一个定位基线 */
.face1,.face2,.face3{
	position:relative;
}
/* face img */
.face1 img,.face2 img,.face3 img{
	padding:3px;
}
/* face em */
.face1 em,.face2 em,.face3 em{
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
}
.face1{
	width:126px;
	height:126px;
}
.face2{
	width:54px;
	height:54px;
}
.face3{
	width:36px;
	height:36px;
}
.face1 em{
	background:url(http://blog.owncsser.com/wp-content/uploads/2010/01/face.gif) 0 0 no-repeat;
}
.face2 em{
	background:url(http://blog.owncsser.com/wp-content/uploads/2010/01/face.gif) 0 -126px  no-repeat;
}
.face3 em{
	background:url(http://blog.owncsser.com/wp-content/uploads/2010/01/face.gif) 0 -180px no-repeat;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;avatar&quot;&gt;
    &lt;div class=&quot;face1&quot;&gt;
        &lt;img src=&quot;http://static1.139js.com/system/avatar/19642548/200/1263120798344124.jpg&quot; width=&quot;120&quot; height=&quot;120&quot; /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;
    &lt;/div&gt;
    &lt;div class=&quot;face2&quot;&gt;
        &lt;img src=&quot;http://static1.139js.com/system/avatar/19642548/48x48/1263120798344124.jpg&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;
    &lt;/div&gt;
    &lt;div class=&quot;face3&quot;&gt;
        &lt;img src=&quot;http://static1.139js.com/system/avatar/19642548/48x48/1263120798344124.jpg&quot; width=&quot;30&quot; height=&quot;30&quot; /&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;
    &lt;/div&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_koAtsZ');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_koAtsZ');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_koAtsZ','runcode_koAtsZ');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/mellowness-avatar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>迟来的作业：表现与结构分离之好友列表操作</title>
		<link>http://blog.owncsser.com/web-standard-friend-list2/</link>
		<comments>http://blog.owncsser.com/web-standard-friend-list2/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 03:39:38 +0000</pubDate>
		<dc:creator>猫小样</dc:creator>
				<category><![CDATA[Web Standard]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=187</guid>
		<description><![CDATA[王开放提交的作业


&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#62;
&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;
&#60;head&#62;
&#60;meta http-equ... ]]></description>
			<content:encoded><![CDATA[<p>王开放提交的作业</p>
<div class="runcode">
<p><textarea name="runcode" style="height:200px;width:600px;font-size:12px" class="runcode_text" id="runcode_QdtFSm">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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;style type=&quot;text/css&quot;&gt;
*{padding:0; margin:0;}
body{padding:50px; font:12px/1.5 Arial, Helvetica, &quot;宋体&quot;, sans-serif; color:#333333;}
.firends{width:378px; height:190px; padding:4px; border:#D6D6D6 solid 1px; background-color:#F7F7F7; overflow:auto;}
.firends li{list-style:none; float:left; text-align:center; padding:0 4px; margin:4px 0; position:relative;}
.firends a{display:block; width:64px; height:81px; text-align:center; color:#333333; text-decoration:none; padding-top:4px;}
.firends a:hover{background:url(http://www.wkaifang.com/wp-content/uploads/2009/11/hover.gif) no-repeat;}
.firends .cur a{background:url(http://www.wkaifang.com/wp-content/uploads/2009/11/bg.gif) no-repeat; color:#FFF;}
.firends img{display:block; padding:2px; border:#DDDDDD solid 1px; background-color:#FFF; margin:0 auto 5px;}
.firends a:hover img{border:#47991f solid 1px;}
.firends .cur a img{border:#96cc29 solid 1px; background-color:#6bb324;}
.firends li strong{background:url(http://www.wkaifang.com/wp-content/uploads/2009/11/v.gif) no-repeat; width:13px; height:13px; text-indent:-9999em; position:absolute; left:11px; top:44px;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;firends&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;cur&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;strong&gt;选中&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;http://www.wkaifang.com/wp-content/uploads/2009/11/img.gif&quot; width=&quot;50&quot; height=&quot;50&quot; alt=&quot;&quot; /&gt; 王开放&lt;/a&gt;&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_QdtFSm');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_QdtFSm');"/> <input type="button" value="另存代码" class="runcode_button" onclick="saveCode('runcode_QdtFSm','runcode_QdtFSm');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/web-standard-friend-list2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web标准化之如何写符合标准的导航</title>
		<link>http://blog.owncsser.com/map-nav/</link>
		<comments>http://blog.owncsser.com/map-nav/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 10:35:14 +0000</pubDate>
		<dc:creator>猫小样</dc:creator>
				<category><![CDATA[Web Standard]]></category>

		<guid isPermaLink="false">http://blog.owncsser.com/?p=182</guid>
		<description><![CDATA[显然，Web标准并不是一个严格执行的标准，但是我们却可以像W3C推荐的那样尽可能的将页面实现标准化。
上周我们讨论了标准的导航写法：
第一种方案
&#60;ul&#62;
&#60;li&#62;&#60;a&#62;&#60;/a&#62;&#60;... ]]></description>
			<content:encoded><![CDATA[<p>显然，Web标准并不是一个严格执行的标准，但是我们却可以像W3C推荐的那样尽可能的将页面实现标准化。</p>
<p>上周我们讨论了标准的导航写法：<br />
第一种方案<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
优点：相对有语义，多一个控制节点，可以灵活控制，实现二级菜单。<br />
缺点：用户体验相对差些，UL的执行效率显然逊色于A标签。</p>
<p>第二种方案<br />
&lt;div&gt;<br />
&lt;a&gt;&lt;/a&gt;<br />
&lt;a&gt;&lt;/a&gt;<br />
&lt;a&gt;&lt;/a&gt;<br />
&lt;/div&gt;<br />
优点：代码简洁，能实现一般类型的导航，页面执行效率要不UL迅猛。<br />
缺点：语义相对差些，若需实现较复杂的导航需要嵌套额外的标签。</p>
<p>那是不是有更标准的更符合语义的做法呢？有人说可以用HTML5里新增加的.</p>
<p>但就目前来看,等待HTML5的发布还为时尚早，再加上不同浏览器的支持程度，更是不敢恭维。</p>
<p>有没有更加合理的解决方案能够填补这个空白？ 有的！</p>
<p>请看如下代码：<br />
&lt;map&gt;&lt;div&gt;<br />
&lt;a&gt;&lt;/a&gt;&lt;a&gt;&lt;/a&gt;&lt;a&gt;&lt;/a&gt;<br />
&lt;/div&gt;&lt;/map&gt;<br />
对 就是 map !W3C官网的写法！</p>
<p>W3C的说明是The MAP element may be used without an associated image for general navigation mechanisms.MAP元素可用于无关联的图像一般导航机制。</p>
<p>map具有地图、导航的特性，结合上面提到的第二个方案，这就是最佳解决方案。当然用map嵌套UL也是可以的，不过显然现在UL的语意就不是那么重要了。提醒大家的是map里面必须嵌套一层块级元素，因为map本身不具有此属性。</p>
<p>详细资料：<a href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-usemap">http://www.w3.org/TR/REC-html40/struct/objects.html#adef-usemap</a><br />
附：W3C官网；<a href="http://www.w3.org/">http://www.w3.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.owncsser.com/map-nav/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

