<?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>haojii &#187; CSS</title>
	<atom:link href="http://www.haojii.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haojii.com</link>
	<description>一个专注于技术的IT男</description>
	<lastBuildDate>Thu, 19 Apr 2012 07:58:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>CSS的link和@import的区别</title>
		<link>http://www.haojii.com/2011/08/difference-between-import-and-link-in-css/</link>
		<comments>http://www.haojii.com/2011/08/difference-between-import-and-link-in-css/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 14:38:57 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=605</guid>
		<description><![CDATA[从功能上来说，基本上没有区别，@import是css导入样式的机制，&#60;link&#62;是html导入样式的机制。 从性能上来说，&#60;link&#62;是有明显优势的。 &#160; Note: 1. 经实践发现@import必须写在文件头部，写在其他位置不生效 2. 经实践发现《精通CSS+DIV网页样式与布局》肯定是本烂书（不知道为啥还卖的那么好），原因如下 2.1 怀疑1.2.4导入样式的说法是以讹传讹，没搜到类似的英文描述 2.2 发现1.2.5CSS样式优先级得出的结论没有逻辑性 2.3 第二章CSS选择器写的太入门了，网上随便找篇blog都写得比这货详细 2.4 第四章直接上图片排版，CSS盒模型和元素定位基础都没讲呢，说明此书拼凑嫌疑巨大 3. 快速浏览剩余章节，发现我的CSS水平虽然菜，但是整体性把握肯定在此书之上。 &#160; 参考: http://stackoverflow.com/questions/1022695/difference-between-import-and-link-in-css http://www.stevesouders.com/blog/2009/04/09/dont-use-import/<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS文字折行与省略号</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fper-post-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为wordpress博客文章设置单独的CSS</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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[<pre class="brush: xml; title: ; notranslate">
&lt;style type=&quot;text/css&quot;&gt;@import url(./stylesheet.css)&lt;/style&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;./stylesheet.css&quot; /&gt;
</pre>
<p><strong>从功能上来说，基本上没有区别，@import是css导入样式的机制，&lt;link&gt;是html导入样式的机制。</strong></p>
<p><strong>从性能上来说，&lt;link&gt;是有明显优势的。</strong></p>
<p>&nbsp;</p>
<p><strong>Note:</strong></p>
<ul>
<li>1. 经实践发现@import必须写在文件头部，写在其他位置不生效</li>
<li>2. 经实践发现<span style="color: #ff0000;">《精通CSS+DIV网页样式与布局》</span>肯定是本<span style="color: #ff0000;">烂书</span>（不知道为啥还卖的那么好），原因如下
<p style="padding-left: 30px;">2.1 怀疑1.2.4导入样式的说法是以讹传讹，没搜到类似的英文描述<br />
2.2 发现1.2.5CSS样式优先级得出的结论没有逻辑性<br />
2.3 第二章CSS选择器写的太入门了，网上随便找篇blog都写得比这货详细<br />
2.4 第四章直接上图片排版，CSS盒模型和元素定位基础都没讲呢，说明此书拼凑嫌疑巨大</p>
</li>
</ul>
<ul>
<li>3. 快速浏览剩余章节，发现我的CSS水平虽然菜，但是整体性把握肯定在此书之上。</li>
</ul>
<p>&nbsp;</p>
<p><strong>参考:</strong></p>
<ul>
<li><a href="http://stackoverflow.com/questions/1022695/difference-between-import-and-link-in-css" target="_blank">http://stackoverflow.com/questions/1022695/difference-between-import-and-link-in-css</a></li>
<li><a href="http://www.stevesouders.com/blog/2009/04/09/dont-use-import/" target="_blank">http://www.stevesouders.com/blog/2009/04/09/dont-use-import/</a></li>
</ul>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS文字折行与省略号</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fper-post-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为wordpress博客文章设置单独的CSS</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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://www.haojii.com/2011/08/difference-between-import-and-link-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS文字折行与省略号</title>
		<link>http://www.haojii.com/2011/04/everything-about-css-text-break/</link>
		<comments>http://www.haojii.com/2011/04/everything-about-css-text-break/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 09:07:48 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[文字折行]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=545</guid>
		<description><![CDATA[相关的几个属性和w3schools的参考如下： white-space 属性设置如何处理元素内的空白。 http://www.w3schools.com/css/pr_text_white-space.asp white-space: normal &#124; nowarp &#124; pre &#124; pre-line &#124; pre-warp &#124; inherit word-warp 属性设置如何处理单词的折行 http://www.w3schools.com/css3/css3_pr_word-wrap.asp word-wrap: normal &#124; break-word word-break 属性设置如何处理单词折断，仅支持IE http://www.w3schools.com/css3/css3_pr_word-break.asp word-break: normal &#124; break-all &#124; hyphenate overflow 属性设置如何处理内容超出元素边框的情况 http://www.w3schools.com/css/pr_pos_overflow.asp overflow: visible &#124; hidden &#124; &#8230; <a href="http://www.haojii.com/2011/04/everything-about-css-text-break/">继续阅读 <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fper-post-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为wordpress博客文章设置单独的CSS</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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>相关的几个属性和w3schools的参考如下：</p>
<p>white-space 属性设置如何处理元素内的空白。<br />
<a href="http://www.w3schools.com/css/pr_text_white-space.asp" target="_blank">http://www.w3schools.com/css/pr_text_white-space.asp<br />
</a>white-space: normal | nowarp | pre | pre-line | pre-warp | inherit</p>
<p>word-warp 属性设置如何处理单词的折行<br />
<a href="http://www.w3schools.com/css3/css3_pr_word-wrap.asp" target="_blank">http://www.w3schools.com/css3/css3_pr_word-wrap.asp<br />
</a>word-wrap: normal | break-word</p>
<p>word-break 属性设置如何处理单词折断，仅支持IE<br />
<a href="http://www.w3schools.com/css3/css3_pr_word-break.asp" target="_blank">http://www.w3schools.com/css3/css3_pr_word-break.asp<br />
</a>word-break: normal | break-all | hyphenate</p>
<p>overflow 属性设置如何处理内容超出元素边框的情况<br />
<a href="http://www.w3schools.com/css/pr_pos_overflow.asp" target="_blank">http://www.w3schools.com/css/pr_pos_overflow.asp<br />
</a>overflow: visible | hidden | scroll | auto | inherit</p>
<p>text-overflow 是一个比较特殊的属性，对于超出元素边框用省略号显示总的来说目前没有完美的css的solution，需要借助javascript的帮助</p>
<p>text-overflow: clip | ellipsis | ellipsis-word<br />
clip : 　不显示省略标记（…），而是简单的裁切<br />
ellipsis : 　当对象内文本溢出时显示省略标记（…），省略标记插入的位置是最后一个字符。<br />
ellipsis-word : 　当对象内文本溢出时显示省略标记（…），省略标记插入的位置是最后一个词（word）。</p>
<p>Opera -o-text-overflow<br />
Firefox3 不支持 可以用-moz-bing解决这个问题 (<a href="https://developer.mozilla.org/En/CSS/-moz-binding" target="_blank">https://developer.mozilla.org/En/CSS/-moz-binding</a>)</p>
<pre class="brush: xml; title: ; notranslate">
&lt;title&gt;文字折行与省略号&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.nowarp {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;/*Not working in FF*/
}
p.warp {
      overflow: hidden;
      white-space: normal;
      word-warp: break-word;
      word-break: break-all;/*Only work in IE*/
      text-overflow: ellipsis;/*Not working in FF*/
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div style=&quot;width: 300px; border: 1px solid red;&quot;&gt;
      &lt;p class=&quot;nowarp&quot;&gt;
      禁止换行，且用省略号表示超出的部分，哈哈哈哈哈哈哈哈啊哈哈啊哈哈
      &lt;/p&gt;
&lt;/div&gt;

&lt;div style=&quot;width: 300px; border: 1px solid red;&quot;&gt;
      &lt;p class=&quot;warp&quot;&gt;
      自动换行，veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylong
      &lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
</pre>
<p>IE和FF下的显示效果</p>
<p><a rel="attachment wp-att-546" href="http://www.haojii.com/2011/04/everything-about-css-text-break/text-linebreak/"><img class="aligncenter size-full wp-image-546" title="text-linebreak" src="http://www.haojii.com/blog/wp-content/uploads/text-linebreak.png" alt="" width="640" height="276" /></a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fper-post-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为wordpress博客文章设置单独的CSS</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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://www.haojii.com/2011/04/everything-about-css-text-break/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>link的地址以斜线开头完全没有道理啊</title>
		<link>http://www.haojii.com/2010/08/never-start-your-link-href-with-slash/</link>
		<comments>http://www.haojii.com/2010/08/never-start-your-link-href-with-slash/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 05:49:13 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[小问题]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=376</guid>
		<description><![CDATA[在内部搭一个类stackoverflow的系统，选了个基于django的开源的osqa，部署的时候陆陆续续发现源码里有点小问题，比如用户相关的很多link是这样写的: 这么搞的话link就指向了服务器的documentRoot，但是我不会把osqa这个应用直接挂在根域名下，这样的hard code我觉得挺愚蠢的。 其实同样的问题也存在我们的jsp里面，这个编程习惯不好，要改正其实也不难，手工做的话可以取得app的rootPath就行了，或者用url标签来帮我们自动搞定。（django&#38;jsp都有的） 另一个Note：osqa第一次装的时候会把配置信息写到forum_keyvalue表里面，后面修改上传路径等的配置没有用，必须到数据库修改。 Something more: Larry wrote 2 useful CSS related posts: CSS – small tips (设置图像最大宽度，打印分页) CSS – sprites, manage images (图像合并切割) END<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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>在内部搭一个类stackoverflow的系统，选了个基于django的开源的osqa，部署的时候陆陆续续发现源码里有点小问题，比如用户相关的很多link是这样写的:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;a href=&quot;/users/{{ user.id }}/{{ user.username|slugify }}/&quot;&gt;{% gravatar user 32 %}&lt;/a&gt;
</pre>
<p>这么搞的话link就指向了服务器的documentRoot，但是我不会把osqa这个应用直接挂在根域名下，这样的hard code我觉得挺愚蠢的。</p>
<p>其实同样的问题也存在我们的jsp里面，这个编程习惯不好，要改正其实也不难，手工做的话可以取得app的rootPath就行了，或者用url标签来帮我们自动搞定。（django&amp;jsp都有的）</p>
<p>另一个Note：osqa第一次装的时候会把配置信息写到forum_keyvalue表里面，后面修改上传路径等的配置没有用，必须到数据库修改。</p>
<pre class="brush: sql; title: ; notranslate">

mysql&gt; update forum_keyvalue set value=&quot;S'/upfiles/logo.png'
    &quot;&gt; p0
    &quot;&gt; .&quot; where id=26;

	mysql&gt; update forum_keyvalue set value=&quot;S'/var/lib/osqa/forum/upfiles'
    &quot;&gt; p0
    &quot;&gt; .&quot; where id=33;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&gt; select * from forum_keyvalue where id=33;
+----+----------------+-------------------------------------+
| id | key            | value                               |
+----+----------------+-------------------------------------+
| 33 | UPFILES_FOLDER | S'/var/lib/osqa/forum/upfiles'
p0
. |
+----+----------------+-------------------------------------+
</pre>
<p>Something more:<br />
Larry wrote 2 useful CSS related posts:<br />
<a title="CSS – small tips" href="http://codeslife.com/?p=164">CSS –  small tips</a> (设置图像最大宽度，打印分页)</p>
<p><a title="CSS – sprites, manage  images" href="http://codeslife.com/?p=159">CSS – sprites, manage images</a> (图像合并切割)</p>
<p>END</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F08%2Fnever-start-your-link-href-with-slash%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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://www.haojii.com/2010/08/never-start-your-link-href-with-slash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>为iPhone优化网页的技巧</title>
		<link>http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/</link>
		<comments>http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 10:05:57 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[web开发]]></category>
		<category><![CDATA[技巧]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=213</guid>
		<description><![CDATA[为iPhone优化网页的技巧,为了使得网页看上去更像native的程序，我们需要对网页进行一些优化

本文包含一些小的技巧：
1. 如何隐藏iPhone Safari的地址栏
2. 如何设置网页的桌面快捷方式图标
3. 如何为网页设置iPhone的样式
4. 如何在网页中检测屏幕的方向
5. 如何在网页中检测当前的位置
 <a href="http://www.haojii.com/2010/02/optimize-web-pages-for-iphone/">继续阅读 <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fa-post-from-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">A post from iPhone</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Fsecond-post-from-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">Second post from iPhone</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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>为了使得网页看上去更像native的程序，我们需要对网页进行一些优化</p>
<p><a href="http://www.haojii.com/webdev/iphone/">使用iPhone访问本文的测试页面</a></p>
<p>本文包含一些小的技巧：<br />
1. 如何隐藏iPhone Safari的地址栏<br />
2. 如何设置网页的桌面快捷方式图标<br />
3. 如何为网页设置iPhone的样式<br />
4. 如何在网页中检测屏幕的方向<br />
5. 如何在网页中检测当前的位置</p>
<p>为iPhone优化网页，最需要了解的应该是下面这个属性<br />
viewport: 可见窗口</p>
<p>可见窗口在iPhone Safari上和桌面Safari略有不同，iPhone上默认没有滚动条，默认的实际的可见大小在竖屏状态下，如下图是320*356，地址栏占据了60像素的高度，稍后我们有办法将其隐藏，得以使用这宝贵的60像素。</p>
<p>iPhone的Safari在显示传统的web网页时（未做优化的网页），viewport会被设置成显示网页宽度的980像素，即在320*356的大小内显示原网页980像素的内容，做了适当的缩放等调整。</p>
<p><a href="http://www.haojii.com/wp-content/uploads/iphone-viewport.png"><img class="aligncenter size-full wp-image-214" title="iphone-viewport" src="http://www.haojii.com/wp-content/uploads/iphone-viewport.png" alt="" width="780" height="600" /></a></p>
<p>所以我们做网页优化的时候，可以通过设置这个meta属性，更多细节可以参考： “Safari Web Content Guide.pdf”</p>
<pre class="brush: xml; title: ; notranslate">
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,height=device-height, initial-scale=1.0, user-scalable=no&quot;/&gt;
</pre>
<p>width=device-width, //设备宽度</p>
<p>height=device-height, //设备高度</p>
<p>initial-scale=1.0, //初始的缩放比例</p>
<p>user-scalable=no //是否允许用户缩放</p>
<h3>小技巧</h3>
<h4>1. 如何隐藏iPhone Safari的地址栏</h4>
<p>设置这个属性(文档里面说有用，但是好像不太成功)</p>
<pre class="brush: xml; title: ; notranslate">&lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot; /&gt;</pre>
<p>还有一种办法，页面加载完成之后滚动窗口，这个确实有效，唯一要注意的是页面高度必须够长，我一般设成device-height就没问题了:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
addEventListener(&quot;load&quot;, function() { setTimeout(hideURLbar, 0); }, false);

function hideURLbar(){
window.scrollTo(0,1);
}
&lt;/script&gt;
</pre>
<h4>2. 如何设置网页的桌面快捷方式图标</h4>
<p>这个其实不算技巧，只是从Apple文档里找到这一项罢了</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;apple-touch-icon.png&quot;/&gt;
&lt;link rel=&quot;apple-touch-startup-image&quot; href=&quot;startup.png&quot;/&gt;
</pre>
<p>第一行就是设置桌面快捷方式图标的，图标必须是57*57像素的文件，不需要自己做圆角和高亮效果，系统会自动帮你搞定这个<br />
放在网页根目录会作用于下面的全部网页，当然也可以为每个页面设置单独的图标</p>
<p>第二行是设置启动画面（没看到成功效果）</p>
<h4>3. 如何为网页设置iPhone的样式</h4>
<p>这个是CSS media selector的一点小技巧</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if !IE]&gt;--&gt;
&lt;link media=&quot;only screen and (max-device-width: 480px)&quot;
  rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;iphone.css&quot;/&gt;
&lt;!--&lt;![endif]--&gt;
</pre>
<h4>4. 如何在网页中检测屏幕的方向</h4>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
function updateOrientation()
{
	var displayStr = &quot;Orientation : &quot;;
	switch(window.orientation)
	{
	case 0:
		displayStr += &quot;Portrait&quot;;
		break;
	case -90:
		displayStr += &quot;Landscape (right, screen turned clockwise)&quot;;
		break;
	case 90:
		displayStr += &quot;Landscape (left, screen turned counterclockwise)&quot;;
		break;
	case 180:
		displayStr += &quot;Portrait (upside-down portrait)&quot;;
		break;
	}
	document.getElementById(&quot;output&quot;).innerHTML = displayStr;
}
&lt;/script&gt;
&lt;body onorientationchange=&quot;updateOrientation();&quot;&gt;
</pre>
<h4>5. 如何在网页中检测当前的位置</h4>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
navigator.geolocation.getCurrentPosition(showMap);
function showMap(position) {
	latitude = position.coords.latitude;
	longitude = position.coords.longitude;
	document.getElementById(&quot;latitude&quot;).innerHTML = latitude;
	document.getElementById(&quot;longitude&quot;).innerHTML = longitude;
}

//Register for location changes
var watchId = navigator.geolocation.watchPosition(scrollMap,handleError);

function scrollMap(position) {
	latitude = position.coords.latitude;
	longitude = position.coords.longitude;
	document.getElementById(&quot;latitude&quot;).innerHTML = &quot;scrollMap-&gt;&quot;+latitude;
	document.getElementById(&quot;longitude&quot;).innerHTML = &quot;scrollMap-&gt;&quot;+longitude;
}
function handleError(error) {
	document.getElementById(&quot;error&quot;).innerHTML = error;
}

function buttonClickHandler() {
	// Unregister when the user clicks a button
	navigator.geolocation.clearWatch(watchId);
}

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;location&quot;&gt;
	latitude:&lt;p id=&quot;latitude&quot;&gt;null&lt;/p&gt;
	longitude:&lt;p id=&quot;longitude&quot;&gt;null&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
	&lt;input type=&quot;button&quot; value=&quot;clearWatch&quot; onclick=&quot;buttonClickHandler();&quot;/&gt;
&lt;/div&gt;
&lt;div id=&quot;error&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
</pre>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fa-post-from-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">A post from iPhone</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Fsecond-post-from-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">Second post from iPhone</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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://www.haojii.com/2010/02/optimize-web-pages-for-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>炫酷CSS超链接按钮一</title>
		<link>http://www.haojii.com/2010/01/cool-css-button-1/</link>
		<comments>http://www.haojii.com/2010/01/cool-css-button-1/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 13:25:54 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=186</guid>
		<description><![CDATA[上一篇文章提到用CSS分割图片的技巧，例子中也展示了一个很漂亮的CSS按钮，今天在tutorialzine看到这篇教程 Sweet AJAX Tabs With jQuery 1.4 &#38; CSS3的按钮也很漂亮，把demo代码下载下来之后，看了一下也是用CSS定位分割图片的技巧做出来的，和上一篇文章中按钮实现略有不同，下面就来解析怎么做出如下的效果: Tab one &#160;&#160; &#160; Tab two &#160;&#160; Tab three &#160;&#160; Tab four &#160;&#160; 首先按钮的HTML代码, 这个按钮的图片由左中右三部分构成，两边的图片是做好了边框效果的，中间的图片可以无限扩展。即下图显示的效果（注：图像来源于tutorialzine原教程） 源图像是这样的，其实还分成了亮度有区别的上下两部分，使用上文中已经介绍过的CSS技巧达到鼠标移上去高亮的效果。 -&#62;-&#62;-&#62; 让我们来看看实现一个按钮核心的CSS代码: 然后是定义按钮size、边框、边距等的CSS代码:<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fper-post-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为wordpress博客文章设置单独的CSS</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script><script src="http://www.haojii.com/webdev/coolbutton1/loadcss.js" type="text/javascript"></script></p>
<p><a href="http://www.haojii.com/2010/01/css_background_image_positioning/">上一篇文章</a>提到用CSS分割图片的技巧，例子中也展示了一个很漂亮的CSS按钮，今天在tutorialzine看到这篇教程<a href="http://tutorialzine.com/2010/01/sweet-tabs-jquery-ajax-css/"> Sweet AJAX Tabs With jQuery 1.4 &amp; CSS3</a>的按钮也很漂亮，把demo代码下载下来之后，看了一下也是用CSS定位分割图片的技巧做出来的，和上一篇文章中按钮实现略有不同，下面就来解析怎么做出如下的效果:</p>
<div id="buttonContainer">
<a class="blue" href="#">Tab one <span class="left">&nbsp;</span><span class="right">&nbsp;</span><br />
<span id="overLine" style="background: none repeat scroll 0% 0% blue;">&nbsp;</span><br />
</a><br />
<a class="green" href="#">Tab two <span class="left">&nbsp;</span><span class="right">&nbsp;</span></a><br />
<a class="red" href="#">Tab three <span class="left">&nbsp;</span><span class="right">&nbsp;</span></a><br />
<a class="orange" href="#">Tab four <span class="left">&nbsp;</span><span class="right">&nbsp;</span></a>
</div>
<p><br/><br/><br/><br/><br/><br />
首先按钮的HTML代码,</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;green&quot; href=&quot;#&quot;&gt;Tab two &lt;span class=&quot;left&quot;&gt;&lt;/span&gt;&lt;span class=&quot;right&quot;&gt;&lt;/span&gt;&lt;/a&gt;
</pre>
<p>这个按钮的图片由左中右三部分构成，两边的图片是做好了边框效果的，中间的图片可以无限扩展。即下图显示的效果（注：图像来源于tutorialzine原教程）</p>
<p><a href="http://www.haojii.com/wp-content/uploads/i32.png"><img class="aligncenter size-full wp-image-187" title="i32" src="http://www.haojii.com/wp-content/uploads/i32.png" alt="" width="620" height="260" /></a></p>
<p>源图像是这样的，其实还分成了亮度有区别的上下两部分，使用上文中已经介绍过的CSS技巧达到鼠标移上去高亮的效果。<br />
-&gt;<img src="http://www.haojii.com/webdev/coolbutton1/img/blue_left.png" alt="" />-&gt;<img src="http://www.haojii.com/webdev/coolbutton1/img/blue_mid.png" alt="" />-&gt;<img src="http://www.haojii.com/webdev/coolbutton1/img/blue_right.png" alt="" /></p>
<p>让我们来看看实现一个按钮核心的CSS代码:</p>
<pre class="brush: css; title: ; notranslate">
a.blue{background:url(img/blue_mid.png) repeat-x top center; color:#03426e;}
a.blue span.left{ background:url(img/blue_left.png) no-repeat left top;}
a.blue span.right{ background:url(img/blue_right.png) no-repeat right top;}
</pre>
<p>然后是定义按钮size、边框、边距等的CSS代码:</p>
<pre class="brush: css; title: ; notranslate">
a,a:visited{
	/* Styling the hyperlinks of the tabs as colorful buttons */
	float:left;
	font-size:18px;
	/* display:block allows for additinal CSS rules to take effect, such as paddings: */
	display:block;
	padding:7px 16px 1px;
	margin:4px 5px;
	height:29px;
	/* Giving positioning */
	position:relative;
	/* CSS3 text-shadow */
	text-shadow:1px 1px 1px #CCCCCC;
}
.left{
	/* The left span in the hyperlink */
	height:37px;
	left:0;
	position:absolute;
	top:0;
	width:10px;
}
.right{
	/* The right span in the hyperlink */
	height:37px;
	right:0;
	position:absolute;
	top:0;
	width:10px;
}
</pre>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS分割背景图片的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fper-post-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为wordpress博客文章设置单独的CSS</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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://www.haojii.com/2010/01/cool-css-button-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS分割背景图片的技巧</title>
		<link>http://www.haojii.com/2010/01/css_background_image_positioning/</link>
		<comments>http://www.haojii.com/2010/01/css_background_image_positioning/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 16:10:36 +0000</pubDate>
		<dc:creator>Jacky</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[web开发]]></category>

		<guid isPermaLink="false">http://www.haojii.com/?p=177</guid>
		<description><![CDATA[// 因为我也不是CSS高手，所以本文的目的是写清楚如何弄明白CSS中分割图片的技巧，说到分割其实并不是真正意义上的剪裁图片，只是已经流行多年了的一种CSS best practise，用一个拼接起来的大的图片资源替代加载多个小图片的一种方法，优点是节约页面的加载速度，不会出现有的图片能显示有的还在加载的情况，这个效果或者性能用firebug可以测试出来。 当然用这个技巧也要选对地方用才行，要是经常需要改动的图像用这个技术还是有点折腾的。 核心的属性是这个：background-position 参数值从w3schools找出来的 Property Values Value Description top left top center top right center left center center center right bottom left bottom center bottom right If you only specify one keyword, the second value will be &#8230; <a href="http://www.haojii.com/2010/01/css_background_image_positioning/">继续阅读 <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS文字折行与省略号</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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><script src="http://www.google.com/jsapi"></script><script type="text/javascript">// <![CDATA[
                  google.load("jquery", "1.3.2");
// ]]&gt;</script></p>
<p><script src="http://www.haojii.com/webdev/cssdemo/loadcss.js" type="text/javascript"></script><br />
因为我也不是CSS高手，所以本文的目的是写清楚如何弄明白CSS中分割图片的技巧，说到分割其实并不是真正意义上的剪裁图片，只是已经流行多年了的一种CSS best practise，用一个拼接起来的大的图片资源替代加载多个小图片的一种方法，优点是节约页面的加载速度，不会出现有的图片能显示有的还在加载的情况，这个效果或者性能用firebug可以测试出来。</p>
<p>当然用这个技巧也要选对地方用才行，要是经常需要改动的图像用这个技术还是有点折腾的。</p>
<p>核心的属性是这个：<a href="http://www.w3schools.com/css/pr_background-position.asp" target="_blank"><code>background-position</code> </a>参数值从w3schools找出来的</p>
<h2>Property Values</h2>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th width="20%" align="left">Value</th>
<th width="70%" align="left">Description</th>
</tr>
<tr>
<td>top left<br />
top center<br />
top right<br />
center left<br />
center center<br />
center right<br />
bottom left<br />
bottom center<br />
bottom right</td>
<td>If you only specify one keyword, the second value will be “center”. Default value is: 0% 0%</td>
</tr>
<tr>
<td><em>x% y%</em></td>
<td>The first value is the horizontal position and the second value is the vertical. The top left corner is 0% 0%. The right bottom corner is 100% 100%. If you only specify one value, the other value will be 50%.</td>
</tr>
<tr>
<td><em>xpos ypos</em></td>
<td>The first value is the horizontal position and the second value is the vertical. The top left corner is 0 0. Units can be pixels (0px 0px) or any other <a href="http://www.w3schools.com/css/css_units.asp">CSS units</a>. If you only specify one value, the other value will be 50%. You can mix % and positions</td>
</tr>
<tr>
<td>inherit</td>
<td>Specifies that the setting of the background-position property should be inherited from the parent element</td>
</tr>
</tbody>
</table>
<p>这里有篇不错的文章描述的是下面这个例子，将原图竖着的1234显示成横着的4个盒子<br />
<a href="http://www.sitepoint.com/blogs/2007/07/05/css-using-percentages-in-background-image/" target="_blank">CSS: Using Percentages in Background-Image</a></p>
<hr />
<div class="box1">.box1</div>
<div class="box2">.box2</div>
<div class="box3">.box3</div>
<div class="box4">.box4</div>
<hr style="clear:both;"/>下面这个例子也是常用到的：<br />
鼠标移到按钮上，用稍微亮一点点的图片显示的悬停效果。<br />
用到的green.png原图： <img src="http://www.haojii.com/webdev/cssdemo/img/green.png" alt="green.png" /><br />
按钮的代码:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;green&quot; href=&quot;#&quot;&gt;Green&lt;span&gt; &lt;/span&gt;&lt;/a&gt;
</pre>
<p>按钮的CSS:</p>
<pre class="brush: css; title: ; notranslate">
a {
	/* The section titles */
	display:block;
	font-size:21px;
	height:34px;
	overflow:hidden;
	padding:10px 20px 0;
	position:relative;
	width:200px;
}
a {
	text-decoration: none;
}
a:hover{
	/* Removing the inherited underline from the titles */
	text-decoration:none;
}
a span{
	/* This span acts as the right part of the section's background */
	height:44px;
	position:absolute;
	right:0;
	top:0;
	width:4px;
	display:block;
}
a.green{background:url(img/green.png) repeat-x top left; color:#436800;}
a.green span{ background:url(img/green.png) repeat-x top right;}
/* The hover effects */
a:hover{ background-position:bottom left;}
</pre>
<p>最重要的一行，鼠标移上去的时候设置图像的位置为bottom left，而下半部分的图像比上半部分亮一点。<br />
效果如下:</p>
<div id="demo1">
<p><a class="green" href="#">Green<span> </span></a></p>
<p><a class="orange" href="#">Orange<span> </span></a></p>
<p><a class="blue" href="#">Blue<span> </span></a></p>
<p><a class="red" href="#">Red<span> </span></a></p>
<p><a class="green2" href="#">from sprite.png<span> </span></a></p>
</div>
<p>最后一个按钮样式和第一个其实是一样的，只不过最后是从sprite.png加载过来的，我使用了<a href="http://cn.spritegen.website-performance.org/">CSS 图片拼合生成器</a>将四张图拼接起来了，然后再用CSS去定位。<br />
拼接完成之后的图：<img src="http://www.haojii.com/webdev/cssdemo/img/sprite.png" alt="sprite.png" /></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1" color="#FF0000" style="display: block !important; padding: 20px 0 5px !important;">其他文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcool-css-button-1%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">炫酷CSS超链接按钮一</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2010%2F02%2Foptimize-web-pages-for-iphone%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">为iPhone优化网页的技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F04%2Feverything-about-css-text-break%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS文字折行与省略号</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.haojii.com%2F2011%2F08%2Fdifference-between-import-and-link-in-css%2F&from=http%3A%2F%2Fwww.haojii.com%2F2010%2F01%2Fcss_background_image_positioning%2F">
                        <font size="-1" color="#667FFA" style="line-height: 1.65em; font-size: 12px !important;">CSS的link和@import的区别</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  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://www.haojii.com/2010/01/css_background_image_positioning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

