<?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>haohtml&#039;s blog &#187; css</title>
	<atom:link href="http://blog.haohtml.com/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.haohtml.com</link>
	<description>haohtml&#039;s life and works</description>
	<lastBuildDate>Tue, 22 May 2012 04:57:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Zen Coding – 超快地写网页代码</title>
		<link>http://blog.haohtml.com/archives/12648</link>
		<comments>http://blog.haohtml.com/archives/12648#comments</comments>
		<pubDate>Fri, 30 Mar 2012 13:40:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Zen Coding]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=12648</guid>
		<description><![CDATA[上次在北京看到善用佳软的 xBeta 演示 VIM 的时候，@sfufoet 我就被强烈震撼到了。VIM 的确是个强大的编辑器，它可以折腾出很多种强大的功能。今天看到这个叫 Zen Coding 的东西，我强烈推荐给经常和 HTML CSS 打交道的朋友。@appinn 下面的动态演示图，只是它强大功能的一部分而已。它无视了编辑器的自动提示和自动完成，秒杀了你自定义的各种快捷键或者 AHK 的热字符串，以智能简洁高效的缩短输入，带给你超快速地书写各种复杂而枯燥的 HTML 和 CSS 代码的体验。 先举一个复杂的例子：zen-coding 可以把这样的代码：div#header&#62;ul.navigation&#62;li*4&#62;a，变成下面的 HTML 代码 &#60;div id=”header”&#62; &#60;ul class=”navigation”&#62; &#60;li&#62;&#60;a href=”"&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href=”"&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href=”"&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href=”"&#62;&#60;/a&#62;&#60;/li&#62; &#60;/ul&#62; &#60;/div&#62; 看到这熟悉的语法结构，会 CSS 的朋友一定会惊声尖叫！最妙的是那个“*4”，直接生成 4 个 li 代码了。没错，Zen Coding 就是这样牛叉的东西，Zen Coding 分为 Zen HTML 和 Zen CSS 两部分。这两部分功能是以插件的形式来实现的。如果你用 NetBeans、SlickEdit、Sublime、TextMate、TopStyle、UltraEdit、WebIDE and IntelliJ IDEA、Dreamweaver、Aptana 都可以在官方下载页面找到相关的插件。 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用CSS 3将我们带入下一个高度吧！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用CSS 3将我们带入下一个高度吧！</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>上次在北京看到善用佳软的 xBeta 演示 VIM 的时候，@<a href="http://www.appinn.com/author/sfufoet/">sfufoet</a> 我就被强烈震撼到了。VIM 的确是个强大的编辑器，它可以折腾出很多种强大的功能。今天看到这个叫 <a href="http://www.appinn.com/Zen-Coding/">Zen Coding</a> 的东西，我强烈推荐给经常和 HTML CSS 打交道的朋友。@appinn</p>
<p>下面的动态演示图，只是它强大功能的一部分而已。它无视了编辑器的自动提示和自动完成，秒杀了你自定义的各种快捷键或者 AHK 的热字符串，以智能简洁高效的缩短输入，带给你超快速地书写各种复杂而枯燥的 HTML 和 CSS 代码的体验。</p>
<div align="center"><a href="http://blog.haohtml.com/wp-content/uploads/2012/03/zen-coding.gif" rel="lightbox[12648]"><img class="aligncenter size-full wp-image-12649" title="zen-coding" src="http://blog.haohtml.com/wp-content/uploads/2012/03/zen-coding.gif" alt="" /></a></div>
<p>先举一个复杂的例子：zen-coding 可以把这样的代码：div#header&gt;ul.navigation&gt;li*4&gt;a，变成下面的 HTML 代码<span id="more-12648"></span></p>
<blockquote><p>&lt;div id=”header”&gt;<br />
&lt;ul class=”navigation”&gt;<br />
&lt;li&gt;&lt;a href=”"&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=”"&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=”"&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=”"&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>看到这熟悉的语法结构，会 CSS 的朋友一定会惊声尖叫！最妙的是那个“*4”，直接生成 4 个 li 代码了。没错，<a href="http://www.appinn.com/Zen-Coding/">Zen Coding</a> 就是这样牛叉的东西，<a href="http://www.appinn.com/Zen-Coding/">Zen Coding</a> 分为 Zen HTML 和 Zen CSS 两部分。这两部分功能是以插件的形式来实现的。如果你用 NetBeans、SlickEdit、Sublime、TextMate、TopStyle、UltraEdit、WebIDE and IntelliJ IDEA、Dreamweaver、Aptana 都可以在官方下载页面找到相关的插件。</p>
<p>即使你不使用上面提到的编辑器，那么还有一种选择，点击下载页面的最后一个链接： Zen Coding for &lt;textarea&gt;。这是一个网页版的 Zen Coding！打开 example.html 之后，把光标定位到文本框里面，按下 Ctrl + E 试试吧。</p>
<p>网页版快捷键说明：</p>
<ol>
<li>Ctrl + E：展开代码</li>
<li>Ctrl + D：向外快速选中代码块</li>
<li>Shift + Ctrl + D：向内快速选中代码块</li>
<li>Shift + Ctrl + A：输入一个缩写，自动展开并包围所选代码</li>
<li>Ctrl + Alt+→ ：光标智能跳转到下一个编辑点（自己试试就知道多体贴了）</li>
<li>Ctrl + Alt+←：光标智能跳转到上一个编辑点</li>
<li>Ctrl + L：选择一行</li>
</ol>
<p>官方演示视频：<a href="http://pepelsbey.net/pro/2008/10/zen-css/">Zen CSS</a> 和 <a href="http://pepelsbey.net/pro/2008/08/zen-html/">Zen HTML</a>。另外，缩写的含义请看：<a href="http://code.google.com/p/zen-coding/wiki/ZenCSSPropertiesEn">Zen CSS Properties</a> 和 <a href="http://code.google.com/p/zen-coding/wiki/ZenHTMLElementsEn">Zen HTML Elements</a>，<a href="http://code.google.com/p/zen-coding/w/list">各种插件的安装方法请看官方 wiki</a>。</p>
<p>最后提醒一点：<a href="http://vimeo.com/7405114">在这个墙外的官方演示视频(高清)中</a>，<a href="http://v.youku.com/v_show/id_XMTM4NDQwNzgw.html">墙内观看地址</a>，还出现了自定义缩写的演示。具体设置过程请参考官方 wiki。</p>
<p><img title="点击右侧的链接下载本软件" src="http://static-y.appinn.com/wp-content/down.gif" alt="Zen Coding   超快地写网页代码[图] | 小众软件" />下载：<a href="http://code.google.com/p/zen-coding/downloads/list">官方网站</a></p>
<p>P.S. 前端观察已经写了详细的教程 <a href="http://www.qianduan.net/zen-coding-a-new-way-to-write-html-code.html">Zen Coding:快速编写 HTML/CSS 代码</a></p>
<p>update: 多谢 SULei 的提醒：EditPlus 也有了，<a href="http://www.vfresh.org/w3c/667">zen code for EditPlus</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用CSS 3将我们带入下一个高度吧！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F12648">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用CSS 3将我们带入下一个高度吧！</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/12648/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>兼容各浏览器的css透明样式写法</title>
		<link>http://blog.haohtml.com/archives/11627</link>
		<comments>http://blog.haohtml.com/archives/11627#comments</comments>
		<pubDate>Sat, 08 Oct 2011 05:12:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=11627</guid>
		<description><![CDATA[#snake{ backgournd: #666; filter:alpha(opacity=50); /*IE*/ -moz-opacity:0.5; /*MOZ , FF*/ opacity:0.5; /*CSS3, FF1.5*/ }<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="link和@import引用css文件方法的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F549&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">link和@import引用css文件方法的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>#snake{<br />
backgournd: #666;<br />
filter:alpha(opacity=50); /*IE*/<br />
-moz-opacity:0.5; /*MOZ , FF*/<br />
<span style="color: #000000;">opacity:0.5; <span style="color: #000000;">/*CSS3, FF1.5*/</span><br />
</span>}</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="link和@import引用css文件方法的区别" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F549&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">link和@import引用css文件方法的区别</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/11627/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>圆角(border-radius)样式</title>
		<link>http://blog.haohtml.com/archives/9378</link>
		<comments>http://blog.haohtml.com/archives/9378#comments</comments>
		<pubDate>Fri, 22 Apr 2011 00:59:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[圆角]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=9378</guid>
		<description><![CDATA[建议参考:http://www.css3.info/preview/rounded-border/ 圆角样式示例(仅在firefox内核,safari,chrome等内核浏览器下支持,IE内核不支持) border-*-*-radius: [ &#60;length&#62; &#124; &#60;%&#62; ] [ &#60;length&#62; &#124; &#60;%&#62; ]? CSS3的border-radius规范 属性： border-top-right-radius border-bottom-right-radius border-bottom-right-radius border-bottom-right-radius 值：&#60;length&#62; &#60;length&#62;。它们分别是定义角形状的四分之一椭圆的两个半径。如图： &#160; 第一个值是水平半径。 如果第二个值省略，则它等于第一个值，这时这个角就是一个四分之一圆角。 如果任意一个值为0，则这个角是矩形，不会是圆的。 值不允许是负值。 属性：border-radius。它是上面四个属性值的简写。 值：&#60;length&#62;{1,4} [ / &#60;length&#62;{1,4} ]&#160; 如果斜线前后的值都存在，那么斜线前的值设置水平半径，且斜线后的值设置垂直半径。如果没有斜线，则水平半径和垂直半径相等。 四 个值是按照top-left、top-right、 bottom-right、 bottom-left的顺序来设置的。如果bottom-left省略，那么它等于top-right。如果bottom-right省略，那么它等于 top-left。如果top-right省略，那么它等于top-left。 应用范围：所有的元素，除了table的样式属性border-collapse是collapse时 内边半径等于外边半径减去对应边的厚度。当这个结果是负值时，内边半径是0。所以内外边曲线的圆心并不一定是一致的。 border-radius也会导致该元素的背景也是圆的，即使border是none。如果background-clip是padding-box，则背景（background）会被曲线的内边裁剪。如果是border-box则被外边裁剪。border和padding定义的区域也一样会被曲线裁剪。 所有的边框样式（solid、dotted、inset等）都遵照角的曲线。如果设置了border-image，则曲线以外的部分会被裁剪掉。 如果角的两个相邻边有不同的宽度，那么这个角将会从宽的边平滑过度到窄的边。其中一条边甚至可以是0。 两条相邻边颜色和样式转变的中心点是在一个和两边宽度成正比的角上。比如，两条边宽度相同，这个点就是一个45°的角上，如果一条边是另外一条边的两倍，那么这个点就在一个30°的角上。界定这个转变的线就是连接在内外曲线上的两个点的直线 角 不允许相互重叠，所以当相邻两个角半径的和大于所在矩形区域的大小时，用户代理（浏览器）比如缩小一个或多个角半径。运算法则如下：f = min(Li/Si)，i ∈ {top, right, bottom, left}，Ltop = Lbottom [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS表格滚动条简例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F342&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS表格滚动条简例</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="兼容各浏览器的css透明样式写法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兼容各浏览器的css透明样式写法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>建议参考:<a href="http://www.css3.info/preview/rounded-border/" target="_blank">http://www.css3.info/preview/rounded-border/</a></p>
<p>圆角样式示例(仅在firefox内核,safari,chrome等内核浏览器下支持,IE内核不支持)</p>
<blockquote><p><strong>border-*-*-radius: </strong>[ <var>&lt;length&gt;</var> | <var>&lt;%&gt;</var> ] [ <var>&lt;length&gt;</var> | <var>&lt;%&gt;</var> ]?</p></blockquote>
<p><strong>CSS3的border-radius规范</strong></p>
<ol>
<li>属性：<br />
border-top-right-radius<br />
border-bottom-right-radius<br />
border-bottom-right-radius<br />
border-bottom-right-radius<br />
值：&lt;length&gt; &lt;length&gt;。它们分别是定义角形状的四分之一椭圆的两个半径。如图：</li>
</ol>
<p>&nbsp;</p>
<ol>
<li>第一个值是水平半径。</li>
<li>如果第二个值省略，则它等于第一个值，这时这个角就是一个四分之一圆角。</li>
<li>如果任意一个值为0，则这个角是矩形，不会是圆的。</li>
<li>值不允许是负值。</li>
</ol>
<ol>
<li>属性：border-radius。它是上面四个属性值的简写。<br />
值：&lt;length&gt;{1,4} [ / &lt;length&gt;{1,4} ]&nbsp;</p>
<ol>
<li>如果斜线前后的值都存在，那么斜线前的值设置水平半径，且斜线后的值设置垂直半径。如果没有斜线，则水平半径和垂直半径相等。</li>
<li>四 个值是按照top-left、top-right、 bottom-right、  bottom-left的顺序来设置的。如果bottom-left省略，那么它等于top-right。如果bottom-right省略，那么它等于 top-left。如果top-right省略，那么它等于top-left。</li>
</ol>
</li>
<li>应用范围：所有的元素，除了table的样式属性border-collapse是collapse时</li>
<li>内边半径等于外边半径减去对应边的厚度。当这个结果是负值时，内边半径是0。所以内外边曲线的圆心并不一定是一致的。</li>
<li>border-radius也会导致该元素的背景也是圆的，即使border是none。如果background-clip是padding-box，则背景（background）会被曲线的内边裁剪。如果是border-box则被外边裁剪。border和padding定义的区域也一样会被曲线裁剪。</li>
<li>所有的边框样式（solid、dotted、inset等）都遵照角的曲线。如果设置了border-image，则曲线以外的部分会被裁剪掉。</li>
<li>如果角的两个相邻边有不同的宽度，那么这个角将会从宽的边平滑过度到窄的边。其中一条边甚至可以是0。</li>
<li>两条相邻边颜色和样式转变的中心点是在一个和两边宽度成正比的角上。比如，两条边宽度相同，这个点就是一个45°的角上，如果一条边是另外一条边的两倍，那么这个点就在一个30°的角上。界定这个转变的线就是连接在内外曲线上的两个点的直线</li>
<li>角 不允许相互重叠，所以当相邻两个角半径的和大于所在矩形区域的大小时，用户代理（浏览器）比如缩小一个或多个角半径。运算法则如下：f =  min(Li/Si)，i ∈ {top, right, bottom, left}，Ltop = Lbottom =  所在矩形区域的宽，Lleft = Lright = 所在矩形区域的高。如果f &lt; 1，那么所有角半径都乘以f。</li>
</ol>
<p><strong>实际CSS应用,需要根据不同浏览器HACK</strong></p>
<div>
<p><span id="more-9378"></span></p>
<blockquote>
<ol id="ubbcode">
<li>-moz-border-radius-topleft: 11px;</li>
<li>-moz-border-radius-topright: 11px;</li>
<li>-khtml-border-top-left-radius: 11px;</li>
<li>-khtml-border-top-right-radius: 11px;</li>
<li>-webkit-border-top-left-radius: 11px;</li>
<li>-webkit-border-top-right-radius: 11px;</li>
<li>border-top-right-radius: 11px;</li>
<li>border-top-left-radius: 11px;</li>
<li>-moz-border-radius-bottomleft: 11px;</li>
<li>-moz-border-radius-bottomright: 11px;</li>
<li>-khtml-border-bottom-left-radius: 11px;</li>
<li>-khtml-border-bottom-right-radius: 11px;</li>
<li>-webkit-border-bottom-left-radius: 11px;</li>
<li>-webkit-border-bottom-right-radius: 11px;</li>
<li>border-bottom-left-radius: 11px;</li>
<li>border-bottom-right-radius: 11px;</li>
</ol>
</blockquote>
</div>
<p>可简写为</p>
<div>
<blockquote>
<ol id="ubbcode">
<li>-moz-border-radius: 15px;</li>
<li>-khtml-border-radius: 15px;</li>
<li>-webkit-border-radius: 15px;</li>
<li>border-radius: 15px;</li>
</ol>
</blockquote>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS表格滚动条简例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F342&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS表格滚动条简例</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="兼容各浏览器的css透明样式写法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F9378">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兼容各浏览器的css透明样式写法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/9378/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css样式float造成的浮动“塌陷”问题的解决办法</title>
		<link>http://blog.haohtml.com/archives/8125</link>
		<comments>http://blog.haohtml.com/archives/8125#comments</comments>
		<pubDate>Thu, 24 Mar 2011 09:25:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=8125</guid>
		<description><![CDATA[什么是CSS Float？ 定义: float 属性定义元素浮动到左侧或右侧。以往这个属性总应用于图像，使文本围绕在图像周围，不过在 CSS 中，任何元素都可以浮动。浮动元素会生成一个块级元素，而不论它本身是何种元素。元素对象设置了float属性之后，它将不再独自占据一行。浮动块可以向左或向右移动，直到它的外边缘碰到包含它的框或另一个浮动块的边框为止。 fload属性有四个可用的值：Left 和Right 分别浮动元素到各自的方向，None (默认的) 使元素不浮动，Inherit 将会从父级元素获取float值。 下面让我们来详细了解下css float 1.Float的用处 除了简单的在图片周围包围文字，浮动可用于创建全部网页布局。 浮动对小型的布局同样有用。例如页面中的这个小区域。如果我们在我们的小头像图片上使用浮动，当调整图片大小的时候，盒子里面的文字也将自动调整位置： 同样的布局可以通过在外容器使用相对定位，然后在头像上使用绝对定位来实现。这种方式中，文本不会受头像图片大小的影响，不会随头像图片的大小而有相应变化。 程序代码 需要用到的CSS样式 body{ margin:0px; padding:0px; text-align:center; font:Arial, Helvetica, sans-serif; font-size:12px;} div,p,ul,li,h2,h3,h4,h5{ padding:0px; margin:0px;line-height:22px;} h1{ font-size:14px;} body &#62;div{ text-align:left; margin:10px auto;} #box{ width:900px; text-align:left;} .box1{ width:370px;border:1px solid #f00;} .box3{border:1px solid #f00;} .box2{ width:370px;border:1px solid #f00;} .box2:after{display:block;clear:both;content:"";visibility:hidden;height:0;} .box1_1{ [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css问题,ie6下有时候边框断断续续bug的解决l办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css问题,ie6下有时候边框断断续续bug的解决l办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="通过在UL标签应用相关的css类，实现对LI的控制" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2500&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">通过在UL标签应用相关的css类，实现对LI的控制</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<h2>什么是CSS Float？</h2>
<p>定义: float 属性定义元素浮动到左侧或右侧。以往这个属性总应用于图像，使文本围绕在图像周围，不过在 CSS 中，任何元素都可以浮动。浮动元素会生成一个块级元素，而不论它本身是何种元素。元素对象设置了float属性之后，它将不再独自占据一行。浮动块可以向左或向右移动，直到它的外边缘碰到包含它的框或另一个浮动块的边框为止。<br />
fload属性有四个可用的值：Left 和Right 分别浮动元素到各自的方向，None (默认的) 使元素不浮动，Inherit 将会从父级元素获取float值。<br />
下面让我们来详细了解下css float</p>
<h2>1.Float的用处</h2>
<p>除了简单的在图片周围包围文字，浮动可用于创建全部网页布局。</p>
<p><img title="1" src="http://www.jb51.net/do/uploads/allimg/091124/0120570.jpg" alt="1" width="367" height="247" /></p>
<p>浮动对小型的布局同样有用。例如页面中的这个小区域。如果我们在我们的小头像图片上使用浮动，当调整图片大小的时候，盒子里面的文字也将自动调整位置：<span id="more-8125"></span></p>
<p><img title="2" src="http://www.jb51.net/do/uploads/allimg/091124/0120571.jpg" alt="2" width="509" height="141" /></p>
<p>同样的布局可以通过在外容器使用相对定位，然后在头像上使用绝对定位来实现。这种方式中，文本不会受头像图片大小的影响，不会随头像图片的大小而有相应变化。</p>
<p><img title="3" src="http://www.jb51.net/do/uploads/allimg/091124/0120572.jpg" alt="3" width="548" height="169" /></p>
<p><strong>程序代码</strong><br />
需要用到的CSS样式<br />
<code><span style="font-family: 新宋体;">body{ margin:0px; padding:0px; text-align:center; font:Arial, Helvetica, sans-serif; font-size:12px;}<br />
div,p,ul,li,h2,h3,h4,h5{ padding:0px; margin:0px;line-height:22px;}<br />
h1{ font-size:14px;}<br />
body &gt;div{ text-align:left; margin:10px auto;}<br />
#box{ width:900px; text-align:left;}<br />
.box1{ width:370px;border:1px solid #f00;}<br />
.box3{border:1px solid #f00;}<br />
.box2{ width:370px;border:1px solid #f00;}<br />
.box2:after{display:block;clear:both;content:"";visibility:hidden;height:0;}<br />
.box1_1{ width:100px; height:70px;border:1px solid #6CF;}<br />
.clear{ clear:both; height:0px; width:0px; font-size:0px; line-height:100%; }<br />
.fl{ float:left;}<br />
.fr{ float:right;}<br />
.hidden{overflow:hidden;}<br />
span{ color:#f00; font-weight:bold;}<br />
.mar{ margin-left:20px;}<br />
.inmar{ display:inline; margin-left:20px;}<br />
.box1_2{ width:200px; float:left; height:100px; background-color:green;}<br />
.box1_3{ width:150px; height:100px; margin-left:200px; background-color:red;}<br />
.box1_4{ width:200px; float:left; height:100px; background-color:green;margin-right:-3px;}<br />
.box1_5{ width:150px; float:left; height:100px; background-color:red;}<br />
.box2_1{  margin-bottom:10px;float:left;width:80px; height:70px;border:1px solid #f00;}<br />
.box2_2{ float:left;width:80px; height:70px;border:1px solid #f00;}<br />
.padbot{ padding-bottom:10px;}</span></code></p>
<h2>2．float浮动元素不占据正常文档流空间</h2>
<p>由于浮动块不在文档的普通流中，所以文档的普通流中的块表现得就像浮动块不存在一样。<br />
·以下是3块div均未加float时在浏览器内显示如下图<br />
<img title="4" src="http://www.jb51.net/do/uploads/allimg/091124/0120573.jpg" alt="4" width="377" height="222" /><br />
代码：</p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
·块1向右浮动，脱离文档流并且向右移动，直到它的右边缘碰到包含块的右边缘。如下图</p>
<p><img title="5" src="http://www.jb51.net/do/uploads/allimg/091124/0120574.jpg" alt="5" width="418" height="152" /></p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:right &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
·块1向左浮动，脱离文档流并且向左移动，直到它的左边缘碰到包含块的左边缘;IE8和Firefox中因为它不再处于文档流中，所以它不占据空间，实际上覆盖住了块 2，使块2从视图中消失。而块2的内容却显示在块1未浮动时块2所处的位置。而IE6和IE7中紧跟在浮动元素块1的块2也会跟着浮动。如下图</p>
<p><img title="6" src="http://www.jb51.net/do/uploads/allimg/091124/0120575.jpg" alt="6" width="389" height="152" /> IE8和Firefox</p>
<p><img title="7" src="http://www.jb51.net/do/uploads/allimg/091124/0120576.jpg" alt="7" width="381" height="155" /> IE6和IE7</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:left &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div style="background:#FCC;"&gt;background:#FCC&lt;span&gt;块2&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code></p>
<h2>3.浮动“塌陷”</h2>
<p>·使用浮动(float)的一个比较疑惑的事情是他们怎么影响包含他们的父元素的。如果父元素只包含浮动元素，且父元素未设置高度和宽度的时候。那么它的高度就会塌缩为零。如果父元素不包含任何的可见背景，这个问题会很难被注意到，但是这是一个很重要的问题。在这里我们可以称为“塌陷”。如下图</p>
<p><img title="8" src="http://www.jb51.net/do/uploads/allimg/091124/0120577.jpg" alt="8" width="379" height="87" /></p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
解决“塌陷”问题有以下三个方法<br />
1.在使用float元素的父元素结束前加一个高为0宽为0且有clear:both样式的div 如下图<br />
<img title="9" src="http://www.jb51.net/do/uploads/allimg/091124/0120578.jpg" alt="9" width="391" height="81" /></p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:left &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
2.在使用float元素的父元素添加overflow:hidden;如下图<br />
<img title="10" src="http://www.jb51.net/do/uploads/allimg/091124/0120579.jpg" alt="10" width="387" height="83" /></p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:left &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
3 .使用after伪对象清除浮动 如下图</p>
<p><img title="11" src="http://www.jb51.net/do/uploads/allimg/091124/01205710.jpg" alt="11" width="383" height="81" /></p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:left &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code></p>
<h2>4. IE6双边距问题</h2>
<p>·IE6双边距问题：一个居左浮动(float:left)的元素放置进一个容器盒(box)，并在浮动元素上使用了左边界(margin-left) 在ie6内便产生双倍边距。如下图</p>
<p><img title="12" src="http://www.jb51.net/do/uploads/allimg/091124/01205711.jpg" alt="12" width="383" height="81" /></p>
<p>IE7、IE8和Firefox</p>
<p><img title="13" src="http://www.jb51.net/do/uploads/allimg/091124/01205712.jpg" alt="13" width="392" height="84" /> IE6</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;<br />
&lt;div&gt;&lt;span&gt;块1&lt;/span&gt; float:left marin_left:10px; &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt; float:left marin_left:10px; &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
这个Bug仅当浮动边界和浮动元素的方向相同时出现在浮动元素和容器盒的内边缘之间，在这之后的任意有着相似边界的浮动元素不会呈现双倍边界。只有特定的浮动行的第一个浮动元素会遭遇这个Bug。像居左的情况一样，双倍边界同样神秘地显示在居右的相同方式。</p>
<p>解决IE6双边距问题: display:inline; 使浮动忽略 如下图</p>
<p><img title="14" src="http://www.jb51.net/do/uploads/allimg/091124/01205713.jpg" alt="14" width="397" height="82" /></p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块1&lt;/span&gt;float:left; marin_left:10px; display:inline; &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块2&lt;/span&gt; float:left marin_left:10px; &lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;&lt;span&gt;块3&lt;/span&gt; float:left&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code></p>
<h2>5.IE6文本产生3象素的bug</h2>
<p>·浮动IE6文本产生3象素的bug时指挨着浮动元素的文本会神奇的被踢出去3像素，好像浮动元素的周围有一个奇怪的力场一样。如下图</p>
<p><img title="15" src="http://www.jb51.net/do/uploads/allimg/091124/01205714.jpg" alt="15" width="381" height="108" /> firefox、IE7、IE8</p>
<p><img title="16" src="http://www.jb51.net/do/uploads/allimg/091124/01205715.jpg" alt="16" width="383" height="114" /> IE6</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;float:left;width:200px; height:100px; background-color:green;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; margin-left:200px; width:150px; height:100px; background-color:red;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
解决浮动IE文本产生3象素问题以下有两个方法<br />
1.左边对象浮动，右边采用外补丁的左边距来定位  如下图<br />
<img title="17" src="http://www.jb51.net/do/uploads/allimg/091124/01205716.jpg" alt="17" width="389" height="118" /> firefox、IE7、IE8、IE6</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;margin-right:-3px; float:left;width:200px; height:100px; background-color:green;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;width:150px; height:100px; background-color:red;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
2.左边对象浮动，右边对象也浮动 如下图</p>
<p><img title="18" src="http://www.jb51.net/do/uploads/allimg/091124/01205717.jpg" alt="18" width="388" height="107" /> firefox、IE7、IE8、IE6</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; float:left; width:200px;height:100px; background-color:green;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; float：left;width:150px; height:100px; background-color:red;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code></p>
<h2>6.IE6,IE7 中，底边距 bug</h2>
<p>·IE6,IE7 中，底边距 bug是当浮动父元素有浮动子元素时，这些子元素的底边距会被父元素忽略掉。如下图</p>
<p><img title="19" src="http://www.jb51.net/do/uploads/allimg/091124/01205718.jpg" alt="19" width="385" height="91" /> firefox</p>
<p><img title="20" src="http://www.jb51.net/do/uploads/allimg/091124/01205719.jpg" alt="20" width="391" height="81" /> IE6、IE7</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; margin-bottom:10px; float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; margin-bottom:10px; float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; margin-bottom:10px; float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; margin-bottom:10px; float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code><br />
解决IE6,IE7 中，底边距 bug：用父元素的底内补白(padding)代替。如下图</p>
<p><img title="21" src="http://www.jb51.net/do/uploads/allimg/091124/01205720.jpg" alt="21" width="390" height="91" /> firefox、IE7、IE8、IE6</p>
<p>代码：<br />
<code><span style="font-family: 新宋体;">&lt;div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt; float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;div&gt;float:left;&lt;/div&gt;</span></code></p>
<p><code><span style="font-family: 新宋体;">&lt;/div&gt;</span></code></p>
<p>这个方法的缺点是不能换行，如果想要换行的话，建议将浮动父元素的浮动子元素设置padding值。</p>
<p>&nbsp;</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css问题,ie6下有时候边框断断续续bug的解决l办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css问题,ie6下有时候边框断断续续bug的解决l办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="通过在UL标签应用相关的css类，实现对LI的控制" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2500&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">通过在UL标签应用相关的css类，实现对LI的控制</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/8125/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css问题,ie6下有时候边框断断续续bug的解决l办法</title>
		<link>http://blog.haohtml.com/archives/8122</link>
		<comments>http://blog.haohtml.com/archives/8122#comments</comments>
		<pubDate>Thu, 24 Mar 2011 07:13:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=8122</guid>
		<description><![CDATA[e6.0下面经常会出现border边框断断续续的问题，初学div+css 的一般不会用遇到这个问题，不过等深一步了解了div之后自然会经常碰到这种问题了，因为初学者不会偷懒，等我们觉得用的很熟了，各种浏览器都能很方便的 兼容之后就会出现这种问题，我有很多同事都碰到过这种问题，其实解决办法很简单，我先简单描述一下边框断裂的效果. 在浏览器下一刷新边框是全的，再以刷新边框就会有断开，什么原因呢，很懊恼的事情，网上一搜也没有答案，下面我就告诉大家解决的方法，其实他是有原因的， 原因就是你的外层有边框，边框层里面嵌套的层里面有浮动，浮动这个最令人懊恼的东西经常会出问题，由于这个原因会引起ie6下面边框断裂，解决办法就是在 外层加 zoom:1; 或者 heigth:100%; 很容易就解决了这个问题。 表现状况：窗口的边框时隐时现。。。 发生情况： 网上说是在一个容器中有元素浮动时容易出现，自己感觉有时内部元素把容器撑开时也会看不到边框。 解决办法： 如果按网上说的是因为浮动的原因的话，那么添加清除浮动则应试可以正常解决。 另外网上的解决办法是：给窗口设置{zoom:1} or { width:100%; height:100%}使其拥有布局即可。 &#160; &#160;<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>e6.0下面经常会出现border边框断断续续的问题，初学div+css 的一般不会用遇到这个问题，不过等深一步了解了div之后自然会经常碰到这种问题了，因为初学者不会偷懒，等我们觉得用的很熟了，各种浏览器都能很方便的 兼容之后就会出现这种问题，我有很多同事都碰到过这种问题，其实解决办法很简单，我先简单描述一下边框断裂的效果.</p>
<p>在浏览器下一刷新边框是全的，再以刷新边框就会有断开，什么原因呢，很懊恼的事情，网上一搜也没有答案，下面我就告诉大家解决的方法，其实他是有原因的， 原因就是你的外层有边框，边框层里面嵌套的层里面有浮动，浮动这个最令人懊恼的东西经常会出问题，由于这个原因会引起ie6下面边框断裂，解决办法就是在 外层加 <span style="color: #0000ff;">zoom:1; </span>或者 <span style="color: #0000ff;">heigth:100%;</span> 很容易就解决了这个问题。</p>
<p>表现状况：窗口的边框时隐时现。。。</p>
<p>发生情况：</p>
<p>网上说是在一个容器中有元素浮动时容易出现，自己感觉有时内部元素把容器撑开时也会看不到边框。</p>
<p><strong>解决办法：</strong></p>
<p>如果按网上说的是因为浮动的原因的话，那么添加清除浮动则应试可以正常解决。</p>
<p>另外网上的解决办法是：给窗口设置<span style="color: #0000ff;">{zoom:1}</span> or <span style="color: #0000ff;">{ width:100%; height:100%}</span>使其拥有布局即可。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/8122/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>float margin-left 浮动对象双倍距离</title>
		<link>http://blog.haohtml.com/archives/5407</link>
		<comments>http://blog.haohtml.com/archives/5407#comments</comments>
		<pubDate>Wed, 01 Sep 2010 04:19:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[iebug]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=5407</guid>
		<description><![CDATA[出现问题是：使用 float: left; 后，在IE显示margin-left:1px;就变成2px的距离。 IE Bug 的解决方法： 加一个 display: inline; 就OK了 #box1{ float: left; background: #F2F2F2; width: 300px; height: 200px; margin-left: 50px; } #box1{ float: left; background: #F2F2F2; width: 300px; height: 200px; margin-left: 50px; display: inline; } margin在IE6下被解释为双倍距离，出现了Margin与float一起用时，在IE6下，其Margin属性会被解释会双倍的距离，margin产生双倍距离其解决兼容问题的两种方法： 1、给当前层增加display: inline;属性。 2、取消浮动：Float。 熟悉规则的人知道浮动元素自动设置为"block"元素，而不管他们之前是什么。这说明浮动元素上的{display: inline;}会被忽略，事实上所有的浏览器没有呈现任何改变，包括IE。但是，它不知何故让IE停止将浮动元素的边界翻倍。因而，这个修复办法在目前 的浏览器下可以被直接应用，而没有任何繁琐的隐藏方法。 应用浮动+margin在IE6会出现双倍距离的现象，注意 只是出现在IE6中，通常这种现象可以用_margin来解决，即针对IE6的hack。 display问题，并不是只有两种显示方式inline和block，还有许多其它的display值，譬如inline-block，可以试一试。在 应用了float之后，无论块级元素还是行内元素都会宽度自适了（当然你没有设定宽度的情况下），就形似inline-block。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css问题,ie6下有时候边框断断续续bug的解决l办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css问题,ie6下有时候边框断断续续bug的解决l办法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>出现问题是：使用 float: left; 后，在IE显示margin-left:1px;就变成2px的距离。<br />
IE Bug 的解决方法：<br />
加一个 display: inline; 就OK了</p>
<div>
<div>
<blockquote>
<pre>#box1{
	float: left;
	background: #F2F2F2;
	width: 300px;
	height: 200px;
	margin-left: 50px;
}</pre>
</blockquote>
</div>
</div>
<div>
<div>
<blockquote>
<pre>#box1{
	float: left;
	background: #F2F2F2;
	width: 300px;
	height: 200px;
	margin-left: 50px;
	display: inline;
}</pre>
</blockquote>
</div>
</div>
<p>margin在IE6下被解释为双倍距离，出现了Margin与float一起用时，在IE6下，其Margin属性会被解释会双倍的距离，<span style="font-family: Arial;">margin产生双倍距离</span>其解决兼容问题的两种方法：</p>
<div>
<div>
<span id="more-5407"></span> 1、给当前层增加display: inline;属性。</p>
<p>2、取消浮动：Float。</p>
<div>熟悉规则的人知道浮动元素自动设置为"block"元素，而不管他们之前是什么。这说明浮动元素上的{display:  inline;}会被忽略，事实上所有的浏览器没有呈现任何改变，包括IE。但是，它不知何故让IE停止将浮动元素的边界翻倍。因而，这个修复办法在目前 的浏览器下可以被直接应用，而没有任何繁琐的隐藏方法。</p>
<p>应用浮动+margin在IE6会出现双倍距离的现象，注意 只是出现在IE6中，通常这种现象可以用_margin来解决，即针对IE6的hack。  display问题，并不是只有两种显示方式inline和block，还有许多其它的display值，譬如inline-block，可以试一试。在 应用了float之后，无论块级元素还是行内元素都会宽度自适了（当然你没有设定宽度的情况下），就形似inline-block。</p></div>
</div>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css问题,ie6下有时候边框断断续续bug的解决l办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8122&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F5407">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css问题,ie6下有时候边框断断续续bug的解决l办法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/5407/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5+CSS3 W3C规范参考手册(提供下载)</title>
		<link>http://blog.haohtml.com/archives/3545</link>
		<comments>http://blog.haohtml.com/archives/3545#comments</comments>
		<pubDate>Mon, 03 May 2010 15:13:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=3545</guid>
		<description><![CDATA[很多人说现在IE浏览器不支持.研究没用.但我觉的.就算IE9出来了,IE6,7,8还是不支持.. 所以现在和以后效果是一样的.都是要搞些兼容性 点击这里下载 以下是参考手册下载地址 : http://files.cnblogs.com/Capricornus/css3.0html5.rar 各大浏览器 CSS3 和 HTML5 兼容速查表 http://news.csdn.net/a/20100401/217692.html 深入了解 HTML 5资源 http://www.comsharp.com/GetKnowledge/zh-CN/It_News_K701.aspx 以下是截图: 没有目标的人都只 在帮有目标的人完成目标。 做网站就像做爱，首先你要懂得 “How To Make Love”，简称HTML ;如果觉得你对HTML已经精通了，你应该学学3P（ASP，PHP，JSP) 。。。 很多人说现在IE浏览器不支持.研究没用.但我觉的.就算IE9出来了,IE6,7,8还是不支持.. 所以现在和以后效果是一样的.都是要搞些兼容性 以下是参考手册下载地址 : http://files.cnblogs.com/Capricornus/css3.0html5.rar 各大浏览器 CSS3 和 HTML5 兼容速查表 http://news.csdn.net/a/20100401/217692.html 深入了解 HTML 5资源 http://www.comsharp.com/GetKnowledge/zh-CN/It_News_K701.aspx 以下是截图: 没有目标的人都只 在帮有目标的人完成目标。 做网站就像做爱，首先你要懂得 “How To Make Love”，简称HTML ;如果觉得你对HTML已经精通了，你应该学学3P（ASP，PHP，JSP) 。。。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用CSS 3将我们带入下一个高度吧！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用CSS 3将我们带入下一个高度吧！</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>很多人说现在IE浏览器不支持.研究没用.但我觉的.就算IE9出来了,IE6,7,8还是不支持..  所以现在和以后效果是一样的.都是要搞些兼容性</p>
<h2><a href="/wp-content/uploads/2010/05/css3.0html5.rar" target="_blank">点击这里下载</a><a href="http://files.cnblogs.com/Capricornus/css3.0html5.rar" target="_blank"></p>
<p>以下是参考手册下载地址 :  http://files.cnblogs.com/Capricornus/css3.0html5.rar</a></h2>
<p>各大浏览器 CSS3 和 HTML5 兼容速查表</p>
<p><a href="http://news.csdn.net/a/20100401/217692.html" target="_blank">http://news.csdn.net/a/20100401/217692.html</a></p>
<h1>深入了解 HTML 5资源</h1>
<p><a href="http://www.comsharp.com/GetKnowledge/zh-CN/It_News_K701.aspx" target="_blank">http://www.comsharp.com/GetKnowledge/zh-CN/It_News_K701.aspx</a></p>
<p><span id="more-3545"></span></p>
<p>以下是截图:</p>
<p><img src="http://pic002.cnblogs.com/img/skyzero110/201004/2010040111401652.jpg" alt="" /><img src="http://pic002.cnblogs.com/img/skyzero110/201004/2010040111392941.jpg" alt="" /></p>
<div id="MySignature">
<hr />
<span style="color: red; padding-left: 200px; font-size: 18px;">没有目标的人都只 在帮有目标的人完成目标。</span></p>
<p><span style="color: #113366; font-size: 14px;">做网站就像做爱，首先你要懂得 “How To Make Love”，简称HTML ;如果觉得你对HTML已经精通了，你应该学学3P（ASP，PHP，JSP) 。。。</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">
<p>很多人说现在IE浏览器不支持.研究没用.但我觉的.就算IE9出来了,IE6,7,8还是不支持..  所以现在和以后效果是一样的.都是要搞些兼容性</p>
<h2><a href="http://files.cnblogs.com/Capricornus/css3.0html5.rar" target="_blank">以下是参考手册下载地址 :  http://files.cnblogs.com/Capricornus/css3.0html5.rar</a></h2>
<h1>各大浏览器 CSS3 和 HTML5 兼容速查表</h1>
<p><a href="http://news.csdn.net/a/20100401/217692.html" target="_blank">http://news.csdn.net/a/20100401/217692.html</a></p>
<h1>深入了解 HTML 5资源</h1>
<p><a href="http://www.comsharp.com/GetKnowledge/zh-CN/It_News_K701.aspx" target="_blank">http://www.comsharp.com/GetKnowledge/zh-CN/It_News_K701.aspx</a></p>
<p>以下是截图:</p>
<p><img src="http://pic002.cnblogs.com/img/skyzero110/201004/2010040111401652.jpg" alt="" /><img src="http://pic002.cnblogs.com/img/skyzero110/201004/2010040111392941.jpg" alt="" /></p>
<div id="MySignature">
<hr />
<span style="color: red; padding-left: 200px; font-size: 18px;">没有目标的人都只 在帮有目标的人完成目标。</span></p>
<p><span style="color: #113366; font-size: 14px;">做网站就像做爱，首先你要懂得 “How To Make Love”，简称HTML ;如果觉得你对HTML已经精通了，你应该学学3P（ASP，PHP，JSP) 。。。</span></div>
</div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用CSS 3将我们带入下一个高度吧！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3545">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用CSS 3将我们带入下一个高度吧！</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/3545/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>谈CSS书写风格</title>
		<link>http://blog.haohtml.com/archives/3371</link>
		<comments>http://blog.haohtml.com/archives/3371#comments</comments>
		<pubDate>Tue, 13 Apr 2010 07:37:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/index.php/archives/3371</guid>
		<description><![CDATA[随着公司业务的增加，需求变的越来越多，团队也因此在不断的扩大，我们经常会遇到几个人协同工作来完成同一件作品或者维护修改别人作品的时候，那么 是什么最让你最感到困扰呢？我们在实现一个表现复杂的页面的同时，CSS文件就会比较繁琐，众多的选择符、属性让人眼花缭乱，那么如何更快的定位、如何更 高效的编写样式呢？CSS的书写被很多人所忽略。关于书写风格，翻看了一些知名网站的作品，发现横向连排几乎成为各大产品项目的主流，然而，每个人对于 CSS的写法各异，这就导致我们工作效率的降低。为了更好的协同工作，保持团队内CSS书写的一致性，几经波折后达成共识，具体书写方法如下：CSS属性 横排书写，选择符纵排书写，每个”,”(逗号)后必须换行; 重构组代码书写规范示例：（其中数字只用做示范，实际应用中不建议用数字命名。） .class_name_1 .class_name_1_1, .class_name_2 .class_name_2_1 .class_name_2_1_1, .class_name_3{style1:value; style2:value; styel3:value; } 有人说，好代码就是用记事本打开也是艺术品，而样式文件本身就是设计作品。目前并没有一个权威来界定这种规范，我们只能对两种写法做个简单的总结。 就样式文件本身对比： 纵向书写特点： 每个CSS属性独立一行，一般不会出现换行或横向滚动条。 可以通过firebug等工具查找到模块，在DW中ctrl+g行定位，修改方便。 属性段落间有缩进，保证了代码的整洁，层次清楚，符合编程语言代码规范，修改更加直观。 存在的问题：代码冗余（如空格符、tab符、换行符）；文件大小增加；容易出现纵向滚动条。 横向书写特点： 最大化的利用了空间，单屏内能显示更多，减小了纵向滚动条出现的几率，能够快速捕获较多的信息。 减小了文件大小，省去了不必要的空格、换行等。 横向书写方便分块以及注释，便于查看CSS结构，选择符一目了然。当今显示器正朝着越来越大，越来越宽发展，基本上一行内可以显示完全。 加快编写CSS速度，不用每次敲换行和tab，并且减少拉动滚动条的次数。 如果是活动页，不用作压缩处理。使用CSS optimizers 来优化CSS是提倡的，但是使用横向书写，基本上不存在多余的空格和换行，因此可以不用压缩，这样效率和能力都会得到提高。 便于阅读和查找相关结构。代码编辑器对同行数定位做的都比较好，因此我们要解决的是如何快速纵向定位目标。横向书写时选择符纵向对齐，再加上 .class_name_2  .class_name_2_1  .class_name_2_1_1的选择符层次分明，因此很容易定位到目标。 在调试小Bug的时候就可以直接打开CSS更改，不用再打开firebug去找到模块。 横向书写，是基于CSS选择符的写法，层次容易对比，更利于模块化。对整体CSS规划有好处，后期维护成本低。 便于不同版本的CSS代码对比。 存在的问题：书写过密，从而影响阅读。这种弊端显而易见，但只要优化做到家，这种状况会很少。 尽管对于现如今的带宽来说，网页文件那仅以K为单位的大小实在是微不足道，但如何将这以K来计算的网页文件精简到最小还是网页设计师们应该考虑的问 题之一。而横向书写省去了不必要的空格、换行等，大大减小了文件大小。我们不能说哪种书写是对的，至于具体采用哪种写法依个人选择，当然 改变习惯可能会影响一个人的工作效率，那我们提倡的是：提交的CSS样式文件是经过代码格式化的，而这个工作可以完全交给DW等工具，我们只要点击一下， 整个文件就会像我们想象的那样呈现出来。这样的代码看起来很舒服，修改容易，团队成员在后续交接也会变得更加顺利。 PS: Dreamweaver下代码格式的设置方法<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="通过在UL标签应用相关的css类，实现对LI的控制" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2500&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">通过在UL标签应用相关的css类，实现对LI的控制</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>随着公司业务的增加，需求变的越来越多，团队也因此在不断的扩大，我们经常会遇到几个人协同工作来完成同一件作品或者维护修改别人作品的时候，那么 是什么最让你最感到困扰呢？我们在实现一个表现复杂的页面的同时，CSS文件就会比较繁琐，众多的选择符、属性让人眼花缭乱，那么如何更快的定位、如何更 高效的编写样式呢？CSS的书写被很多人所忽略。关于书写风格，翻看了一些知名网站的作品，发现横向连排几乎成为各大产品项目的主流，然而，每个人对于 CSS的写法各异，这就导致我们工作效率的降低。为了更好的协同工作，保持团队内CSS书写的一致性，几经波折后达成共识，具体书写方法如下：CSS属性 横排书写，选择符纵排书写，每个”,”(逗号)后必须换行;<span id="more-3371"></span></p>
<p><strong>重构组代码书写规范示例：（其中数字只用做示范，实际应用中不建议用数字命名。）</strong></p>
<p><strong>.class_name_1 .class_name_1_1,<br />
.class_name_2 .class_name_2_1 .class_name_2_1_1,<br />
.class_name_3{style1:value; style2:value; styel3:value; }</strong></p>
<p>有人说，好代码就是用记事本打开也是艺术品，而样式文件本身就是设计作品。目前并没有一个权威来界定这种规范，我们只能对两种写法做个简单的总结。</p>
<p><strong>就样式文件本身对比：</strong></p>
<p><img src="http://webteam.tencent.com/wp-content/uploads/2009/5/1080_001.jpg" alt="样式文件对比列表" /></p>
<p><strong>纵向书写特点：</strong></p>
<ol>
<li>每个CSS属性独立一行，一般不会出现换行或横向滚动条。</li>
<li>可以通过firebug等工具查找到模块，在DW中ctrl+g行定位，修改方便。</li>
<li>属性段落间有缩进，保证了代码的整洁，层次清楚，符合编程语言代码规范，修改更加直观。</li>
</ol>
<p><strong>存在的问题：</strong>代码冗余（如空格符、tab符、换行符）；文件大小增加；容易出现纵向滚动条。</p>
<p><strong>横向书写特点：</strong></p>
<ol>
<li>最大化的利用了空间，单屏内能显示更多，减小了纵向滚动条出现的几率，能够快速捕获较多的信息。</li>
<li>减小了文件大小，省去了不必要的空格、换行等。</li>
<li>横向书写方便分块以及注释，便于查看CSS结构，选择符一目了然。当今显示器正朝着越来越大，越来越宽发展，基本上一行内可以显示完全。</li>
<li>加快编写CSS速度，不用每次敲换行和tab，并且减少拉动滚动条的次数。</li>
<li>如果是活动页，不用作压缩处理。使用CSS optimizers  来优化CSS是提倡的，但是使用横向书写，基本上不存在多余的空格和换行，因此可以不用压缩，这样效率和能力都会得到提高。</li>
<li>便于阅读和查找相关结构。代码编辑器对同行数定位做的都比较好，因此我们要解决的是如何快速纵向定位目标。横向书写时选择符纵向对齐，再加上<br />
.class_name_2  .class_name_2_1  .class_name_2_1_1的选择符层次分明，因此很容易定位到目标。<br />
在调试小Bug的时候就可以直接打开CSS更改，不用再打开firebug去找到模块。</li>
<li>横向书写，是基于CSS选择符的写法，层次容易对比，更利于模块化。对整体CSS规划有好处，后期维护成本低。</li>
<li>便于不同版本的CSS代码对比。</li>
</ol>
<p><strong>存在的问题：</strong>书写过密，从而影响阅读。这种弊端显而易见，但只要优化做到家，这种状况会很少。</p>
<p>尽管对于现如今的带宽来说，网页文件那仅以K为单位的大小实在是微不足道，但如何将这以K来计算的网页文件精简到最小还是网页设计师们应该考虑的问 题之一。而横向书写省去了不必要的空格、换行等，大大减小了文件大小。<strong>我们不能说哪种书写是对的，至于具体采用哪种写法依个人选择，当然 改变习惯可能会影响一个人的工作效率，那我们提倡的是：提交的CSS样式文件是经过代码格式化的，而这个工作可以完全交给DW等工具，我们只要点击一下， 整个文件就会像我们想象的那样呈现出来。这样的代码看起来很舒服，修改容易，团队成员在后续交接也会变得更加顺利。</strong></p>
<p>PS: Dreamweaver下代码格式的设置方法</p>
<p><img src="http://webteam.tencent.com/wp-content/uploads/2009/5/1080_002.jpg" alt="Dreamweaver下代码格式的设置方法" /></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="通过在UL标签应用相关的css类，实现对LI的控制" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2500&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">通过在UL标签应用相关的css类，实现对LI的控制</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="深入 CSS 行高" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3354&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">深入 CSS 行高</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css样式float造成的浮动“塌陷”问题的解决办法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F8125&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/26/4287082.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css样式float造成的浮动“塌陷”问题的解决办法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/3371/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>页面重构中的模块化思维</title>
		<link>http://blog.haohtml.com/archives/3362</link>
		<comments>http://blog.haohtml.com/archives/3362#comments</comments>
		<pubDate>Tue, 13 Apr 2010 07:31:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/index.php/archives/3362</guid>
		<description><![CDATA[最近被“模块化”缠身，又是文章又是PPT的，被逼着想了很多相关的东西。整理下我这段时间对于“模块化”的思考，大多都是我自己从事页面重构这份 工作的经验和理解，在一定程度上存在局限性，也希望自己能温故而知新。 “模块化”只是我们对于过去一直使用的技术、方法的一个新潮的称谓，就像“Ajax”。不过做为页面重构发展的一种趋势，越来越被大家重视，不自觉 也满口的“模块化”，只是你真的理解什么是“模块化”吗？ 什么是模块化？ 对“模块化”的解释，在 CNKI 中就有28种。可见“模块化”思维使用的广泛。最接近页面重构中的“模块化”，现有的解释应该就是软件开发中的解释了。 先看一下百度词条是怎么解释“ 模块化 ”的： 模 块化是指解决一个复杂问题时自顶向下逐层把软件系统划分成若干模块的过程。每个模块完成一个特定的子功能，所有的模块按某种方法组装起来，成为一个整体， 完成整个系统所要求的功能。模块具有以下几种基本属性：接口、功能、逻辑、状态，功能、状态与接口反映模块的外部特性，逻辑反映它的内部特性。在软件的体 系结构中，模块是可组合、分解和更换的单元。 相关的书籍也蛮多的，有兴趣的同学可以搜一下。需要强调一点，我们所借鉴的是一种思维的方式。 页面制作为什么需要模块化？ 站点内容越来越多、代码越来越臃肿，渐渐影响到了客户端的体验（主要是打开速度），影响到了维护的效率。有什么方法可以解决这些问题呢？ 我 们很容易就想到：减少代码冗余、提高代码重用率、图片压缩等等，而这些要如何实现呢？模块化思维可以解决，即可以有效减少代码冗余、提高代码重用率，更重 要是可以支持到多人维护，降低维护成本。CSS写法较为灵活，容易产生代码的耦合，使用模块化也可以在一定程度上降低耦合度，对于BUG的定位也有帮助。 所以，我们更应该在站点前期就重视并使用“模块化的思维”编写站点。 我们之前经常提到的站点性能优化，有相当一部分也是“模块化”的内容，比如提高代码重用，提高开发效率等等，“模块化”的优点还有很多，我大概列了 一下： 提高代码重用率 提高开发效率、减少沟通成本 降低耦合 降低发布风险 减少Bug定位时间和Fix成本 提高页面容错 更好的实现快速迭代 更好的支持灰度发布 其中最重要的一点，我认为是“提高代码重用率”，这也是模块化最重要的特点之一。 如何实现“模块化”？ 这里的主要问题是HTML与CSS的“模块化”，我们可以看下换肤的实现方法： 同一类名，换文件（JS） 同一文件，换类名（JS） 由此可知HTML与CSS的接口实现： CSS引入的三种方式 类名 为 了更好的实现这种接口，需要有相关的（交互、设计、页面、开发）约定、规则、规范，比如：所有当前状态都使用同一个类名“nonce”，所有变灰的表现都 使用原类名后加“_n”，Tab的实现方式等等。有了这些约定、规则、规范后，HTML代码就很容易可以实现模板化，统一接口规范。 有两个误区需要先认清下： 模块化后并不是就能被使用在任何位置（模块化后的代码段也是有适用的范围限制，需要一个提供接口规则的环境） 模块化后并不是就不能再变更（模块化后的代码段可根据实际需要做修改） 完 全独立的模块放在同一项目中，由于项目有自己的表现、交互统一性，所以各模块间必定出现类似的部分，这些部分可以被提出来做为公共的定义，减少冗余，这时 就会出现耦合的问题，完全不耦合是不可能的，因此模块化中很重要一点就是“适度的耦合”。有了公共定义，就得调整模块样式的实现方式了，而这种调整也会影 响到“接口”的实现方式。 由于本篇主要是讲模块化的思维方式，具体实现的细节留待以后的文章中探讨。相关内容可以看下之前写的《从宜家的家具设计讲模块化》。欢迎一起讨论。<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="兼容各浏览器的css透明样式写法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兼容各浏览器的css透明样式写法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>最近被“模块化”缠身，又是文章又是PPT的，被逼着想了很多相关的东西。整理下我这段时间对于“模块化”的思考，大多都是我自己从事页面重构这份 工作的经验和理解，在一定程度上存在局限性，也希望自己能温故而知新。</p>
<p>“模块化”只是我们对于过去一直使用的技术、方法的一个新潮的称谓，就像“Ajax”。不过做为页面重构发展的一种趋势，越来越被大家重视，不自觉 也满口的“模块化”，只是你真的理解什么是“模块化”吗？<span id="more-3362"></span></p>
<h3>什么是模块化？</h3>
<p>对“模块化”的解释，在 <a href="http://www.cnki.net/gycnki/gycnki.htm"><span>CNKI</span></a> 中就有28种。可见“模块化”思维使用的广泛。最接近页面重构中的“模块化”，现有的解释应该就是软件开发中的解释了。</p>
<p>先看一下百度词条是怎么解释“ <a href="http://baike.baidu.com/view/182267.htm">模块化</a> ”的：</p>
<p><cite>模  块化是指解决一个复杂问题时自顶向下逐层把软件系统划分成若干模块的过程。每个模块完成一个特定的子功能，所有的模块按某种方法组装起来，成为一个整体，   完成整个系统所要求的功能。模块具有以下几种基本属性：接口、功能、逻辑、状态，功能、状态与接口反映模块的外部特性，逻辑反映它的内部特性。在软件的体  系结构中，模块是可组合、分解和更换的单元。</cite></p>
<p>相关的书籍也蛮多的，有兴趣的同学可以搜一下。需要强调一点，我们所借鉴的是一种思维的方式。</p>
<h3>页面制作为什么需要模块化？</h3>
<p>站点内容越来越多、代码越来越臃肿，渐渐影响到了客户端的体验（主要是打开速度），影响到了维护的效率。有什么方法可以解决这些问题呢？</p>
<p>我  们很容易就想到：减少代码冗余、提高代码重用率、图片压缩等等，而这些要如何实现呢？模块化思维可以解决，即可以有效减少代码冗余、提高代码重用率，更重   要是可以支持到多人维护，降低维护成本。CSS写法较为灵活，容易产生代码的耦合，使用模块化也可以在一定程度上降低耦合度，对于BUG的定位也有帮助。  所以，我们更应该在站点前期就重视并使用“模块化的思维”编写站点。</p>
<p>我们之前经常提到的站点性能优化，有相当一部分也是“模块化”的内容，比如提高代码重用，提高开发效率等等，“模块化”的优点还有很多，我大概列了 一下：</p>
<ul>
<li>提高代码重用率</li>
<li>提高开发效率、减少沟通成本</li>
<li>降低耦合</li>
<li>降低发布风险</li>
<li>减少Bug定位时间和Fix成本</li>
<li>提高页面容错</li>
<li>更好的实现快速迭代</li>
<li>更好的支持灰度发布</li>
</ul>
<p>其中最重要的一点，我认为是“提高代码重用率”，这也是模块化最重要的特点之一。</p>
<h3>如何实现“模块化”？</h3>
<p>这里的主要问题是HTML与CSS的“模块化”，我们可以看下换肤的实现方法：</p>
<ul>
<li>同一类名，换文件（JS）</li>
<li>同一文件，换类名（JS）</li>
</ul>
<p>由此可知HTML与CSS的接口实现：</p>
<ul>
<li>CSS引入的三种方式</li>
<li>类名</li>
</ul>
<p>为  了更好的实现这种接口，需要有相关的（交互、设计、页面、开发）约定、规则、规范，比如：所有当前状态都使用同一个类名“nonce”，所有变灰的表现都  使用原类名后加“_n”，Tab的实现方式等等。有了这些约定、规则、规范后，HTML代码就很容易可以实现模板化，统一接口规范。</p>
<p>有两个误区需要先认清下：</p>
<ul>
<li>模块化后并不是就能被使用在任何位置（模块化后的代码段也是有适用的范围限制，需要一个提供接口规则的环境）</li>
<li>模块化后并不是就不能再变更（模块化后的代码段可根据实际需要做修改）</li>
</ul>
<p>完  全独立的模块放在同一项目中，由于项目有自己的表现、交互统一性，所以各模块间必定出现类似的部分，这些部分可以被提出来做为公共的定义，减少冗余，这时   就会出现耦合的问题，完全不耦合是不可能的，因此模块化中很重要一点就是“适度的耦合”。有了公共定义，就得调整模块样式的实现方式了，而这种调整也会影  响到“接口”的实现方式。</p>
<p>由于本篇主要是讲模块化的思维方式，具体实现的细节留待以后的文章中探讨。相关内容可以看下之前写的<a href="http://webteam.tencent.com/?p=711">《从宜家的家具设计讲模块化》</a>。欢迎一起讨论。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="兼容各浏览器的css透明样式写法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F11627&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3362">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">兼容各浏览器的css透明样式写法</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/3362/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用CSS 3将我们带入下一个高度吧！</title>
		<link>http://blog.haohtml.com/archives/3359</link>
		<comments>http://blog.haohtml.com/archives/3359#comments</comments>
		<pubDate>Tue, 13 Apr 2010 07:27:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[前端设计]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.haohtml.com/?p=3359</guid>
		<description><![CDATA[“CSS 3 不是新事物，更不是只是围绕border-radius属性实现的圆角。它正耐心的坐在那里，已经准备好了首次登场，呷着咖啡，等着浏览器来铺上红地毯。 你看，浏览器需要跟上了……” –谨以此文纪录ISD WEBTEAM 09年Q2力作：CSS 3.0 中文参考手册 背景 苏昱的《样式表中文手册》为代表的 CSS2.0参考资料伴随了国内众多web设计师们走过了近10年的时光，这种影响是深远的，但随着CSS技术的不断发展，设计师们多受传统资料的影响， 不能超脱现有的篱笆，给自己背上了沉重的包袱。你是否已注意到CSS 3已经蓄势待发？你是否渴望开始使用它们却又不知从何下手呢？正当CSS 3新特性备受期待的时候，我们的CSS3.0 中文参考手册就应运而生了…… 什么是CSS 3？ CSS 是 Cascading Style Sheet 的缩写。译作「层叠样式表」。是用于(增强)控制网页样式并允许将样式信息与网页内容分离的一种标记性语言。 CSS3.0 则表示下一版本的CSS，3.0是版本号。 CSS 3给我们带来了什么惊喜？ CSS3.0对于我们Web设计人员来说不只 是新奇的技术，更重要的是这些全新概念的web应用给我们的设计更多的无限可能性，也极大的提高了我们的开发效率。我们将不必再依赖图片或者 Javascript 去完成圆角、多背景、用户自定义字体、3D动画、渐变、盒阴影、文字阴影、透明度等提高Web设计质量的特色应用。CSS 3 .0的出现，让代码更简洁、页面结构更合理，性能和效果得到兼顾。 使用说明 本手册服务对象为网页重构师或前端开发工程师。 本手册根据W3C工作草案进行翻译，存在一定的不确定因素，最终解释权归ISD WEBTEAM所有。 本手册的编排参考css3.info的CSS Preview将CSS 3 属性分为边框、背景、颜色、文本、用户界面、基础盒模型、内容、其它模块、高级选择器九大类。 兼容性列表暂时提供Internet Explorer、FireFox、Opera、Safari、Chrome的正式版浏览器兼容性。 私有属性列表中，使用Gecko引擎的浏览器有Firefox，私有属性以-moz-开始；webkit引擎的浏览器有Safari、 Chrome，以-webkit-开始；Presto引擎的浏览器有Opera，以-o-开始， 以及Internet Explorer，以-ms-开始，目前只有IE8支持-ms-前缀。 针对每个属性制作的示例除了@font face因涉及字体版权取自微软的示例，其它均为团队成员结合自身的沉淀制作，由于手册篇幅的局限性，也许有些示例难以理解，后续我们将对这部分示例单独 以文章详细分析。 继承性，鉴于W3C工作草案未对继承性有较清晰的说明，本期未对继承性有测试，暂不具备参考价值。 如下载的CHM文件打不开，可以尝试右键点击CHM文件，然后在“属性”中“解除锁定”。 本手册主要用于交流，限于时间紧张，且为业余深耕夜作，错误和遗漏难免，望大家在使用中多多反馈。我们会不断的完善和升级本手册。这里提供手册 V1版，以月为单位不定期更新。 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS表格滚动条简例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F342&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS表格滚动条简例</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p style="color: #999999;" align="left"><strong>“</strong>CSS  3  不是新事物，更不是只是围绕border-radius属性实现的圆角。它正耐心的坐在那里，已经准备好了首次登场，呷着咖啡，等着浏览器来铺上红地毯。 你看，浏览器需要跟上了……<strong>”</strong></p>
<p style="text-align: right; margin-top: -20px; margin-bottom: 10px; color: #999999;">–谨以此文纪录ISD WEBTEAM 09年Q2力作：CSS 3.0 中文参考手册</p>
<p><strong>背景</strong></p>
<p style="margin-top: -25px; margin-bottom: 15px;">苏昱的《样式表中文手册》为代表的 CSS2.0参考资料伴随了国内众多web设计师们走过了近10年的时光，这种影响是深远的，但随着CSS技术的不断发展，设计师们多受传统资料的影响， 不能超脱现有的篱笆，给自己背上了沉重的包袱。你是否已注意到CSS 3已经蓄势待发？你是否渴望开始使用它们却又不知从何下手呢？正当CSS  3新特性备受期待的时候，我们的CSS3.0 中文参考手册就应运而生了……<span id="more-3359"></span></p>
<p><strong>什么是CSS 3？</strong></p>
<p style="margin-top: -25px; margin-bottom: 15px;">CSS 是 Cascading Style  Sheet 的缩写。译作「层叠样式表」。是用于(增强)控制网页样式并允许将样式信息与网页内容分离的一种标记性语言。<br />
CSS3.0 则表示下一版本的CSS，3.0是版本号。</p>
<p align="left"><strong>CSS 3</strong><strong>给我们带来了什么惊喜？</strong></p>
<p style="margin-top: -25px; margin-bottom: 15px;">CSS3.0对于我们Web设计人员来说不只 是新奇的技术，更重要的是这些全新概念的web应用给我们的设计更多的无限可能性，也极大的提高了我们的开发效率。我们将不必再依赖图片或者  Javascript 去完成圆角、多背景、用户自定义字体、3D动画、渐变、盒阴影、文字阴影、透明度等提高Web设计质量的特色应用。CSS 3  .0的出现，让代码更简洁、页面结构更合理，性能和效果得到兼顾。</p>
<p><strong>使用说明</strong></p>
<ul style="margin-left: -30px; margin-top: -15px; margin-bottom: 15px;">
<li>本手册服务对象为网页重构师或前端开发工程师。</li>
<li>本手册根据W3C工作草案进行翻译，存在一定的不确定因素，最终解释权归ISD WEBTEAM所有。</li>
<li>本手册的编排参考<a href="http://www.css3.info/">css3.info</a>的CSS  Preview将CSS 3 属性分为边框、背景、颜色、文本、用户界面、基础盒模型、内容、其它模块、高级选择器九大类。</li>
<li>兼容性列表暂时提供Internet Explorer、FireFox、Opera、Safari、Chrome的正式版浏览器兼容性。</li>
<li>私有属性列表中，使用Gecko引擎的浏览器有Firefox，私有属性以-moz-开始；webkit引擎的浏览器有Safari、 Chrome，以-webkit-开始；Presto引擎的浏览器有Opera，以-o-开始， 以及Internet  Explorer，以-ms-开始，目前只有IE8支持-ms-前缀。</li>
<li>针对每个属性制作的示例除了@font  face因涉及字体版权取自微软的示例，其它均为团队成员结合自身的沉淀制作，由于手册篇幅的局限性，也许有些示例难以理解，后续我们将对这部分示例单独 以文章详细分析。</li>
<li>继承性，鉴于W3C工作草案未对继承性有较清晰的说明，本期未对继承性有测试，暂不具备参考价值。</li>
<li>如下载的CHM文件打不开，可以尝试右键点击CHM文件，然后在“属性”中“解除锁定”。</li>
<li>本手册主要用于交流，限于时间紧张，且为业余深耕夜作，错误和遗漏难免，望大家在使用中多多反馈。我们会不断的完善和升级本手册。这里提供手册 V1版，以月为单位不定期更新。</li>
</ul>
<p align="left"><strong>CSS 3.0 </strong><strong>参考手册 (中文版) 预览：</strong><strong> </strong></p>
<p style="margin-top: -25px; margin-bottom: 15px;">不管你是第一次准备去认识CSS  3，还是已经略知皮毛，CSS 3.0 参考手册 (中文版)将有助你更好的学习和理解CSS 3 。还等什么？猛击<a href="http://webteam.tencent.com/css3/" target="_blank">http://webteam.tencent.com/css3/</a>下 载吧！</p>
<p><strong>总结</strong></p>
<p style="margin-top: -20px; margin-bottom: 10px; text-indent: 2em;">CSS  3  属性不仅可以极大的提高我们的工作效率，让一些最耗时的CSS任务不费吹灰之力就能搞定，并且可以使用更简洁和更轻量的代码标签。虽然一些属性尚未被广泛 的支持，但这并不意味着我们不能为使用高级浏览器的用户提供更好的体验。</p>
<p style="margin-bottom: 10px; text-indent: 2em;">CSS 3  能让我们的优化工作有了新的突破。当你已经完成了图片合并、代码精简等优化工作之后，正在焦头烂额不知道还要做啥的时候，可以尝试把用户进行拆分，去寻求 更深层次的突破。例如针对一些高级浏览器使用圆角属性，在IE浏览器使用条件注释（或者hack），那么是不是可以在保证效果的同时，让网页更快的呈现在 使用高级浏览器的用户面前呢？</p>
<p style="margin-bottom: 10px; text-indent: 2em;">如果我们的网站在各个浏览器里的一个差异不影响 美观和网站的可用性，它就应该是被考虑的。如果我们继续浪费大量的时间和精力以使每个细节绝对一致(而不是采用更灵活的和未来导向的方案)，用户将没有升 级他们的浏览器的任何动机，我们也就不能更早、更广泛的使用它们。</p>
<p style="margin-bottom: 10px; text-indent: 2em;">我相信随着时间的推进和更多浏览器的支 持，CSS 3 将越来越受欢迎，它将为web设计师们带来无穷的能量。Web设计师们，还等什么？让我们一起来感受CSS 3 的能量，用CSS 3  将我们带入下一个高度吧！</p>
<p><strong>特别鸣谢</strong></p>
<p style="margin-top: -25px; margin-bottom: 15px;">项目过程中，我们也遇到了很多难点，W3C未 正式发布CSS 3  ，工作草案不断更新，存在诸多不确定因素，中文资料匮乏，涉及多个浏览器多个版本的浏览器兼容性测试，测试过程繁琐等等，项目组成员都逐步克服，感谢大家 在平时需求压力也比较大的时候还能保持着很高的激情参与到CSS 3  项目中来，在公司加完班，回家了还忙着翻译、测试浏览器兼容性等等，有时候CSS3项目群里讨论的聊天记录到凌晨1、2点…正因为有了可爱的你们，项目才 能如此顺利的进行.</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="css中potition的理解总结" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F2944&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023483.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">css中potition的理解总结</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="谈CSS书写风格" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3371&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/03/22/4023463.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">谈CSS书写风格</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="[译]Efficient, maintainable CSS" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3356&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[译]Efficient, maintainable CSS</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS表格滚动条简例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F342&from=http%3A%2F%2Fblog.haohtml.com%2Farchives%2F3359">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS表格滚动条简例</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.haohtml.com/archives/3359/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

