<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>冰剑'blog</title><link>http://www.xunzou.com/blog/</link><description>专注于WEB前端开发 | 2010 重生</description><generator>RainbowSoft Studio Z-Blog 1.8 Walle Build 91204</generator><language>zh-CN</language><copyright>Copyright 2010 xunzou.com. Rights Reserved.备案序号:豫ICP备05003168号var gaJsHost = ((&amp;quot;https:&amp;quot; == document.location.protocol) ? &amp;quot;https://ssl.&amp;quot; : &amp;quot;http://www.&amp;quot;);document.write(unescape(&amp;quot;%3Cscript src='&amp;quot; + gaJsHost + &amp;quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&amp;quot;));try {var pageTracker = _gat._getTracker(&amp;quot;UA-11478901-1&amp;quot;);pageTracker._trackPageview();} catch(err) {}</copyright><pubDate>Sat, 17 Dec 2011 22:19:11 +0800</pubDate><item><title>在web页面中引用css的四种方法</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/622.html</link><pubDate>Wed, 30 Nov 2011 15:04:58 +0800</pubDate><guid>http://www.xunzou.com/blog/post/622.html</guid><description><![CDATA[<p>作为一名前端开发工程师，平时在制作页面的时候，我们我们会用到很多中将CSS引入页面的方法，那么，今天我将分享一下这些方法，并讨论那种方法更好一些。</p><br/><h3>1.用<link>标签：</h3><p>这种方法是最好的一种，在页面的<head>标签中加入如下代码：</p>[code=html]<link rel="stylesheet" href="style.css" type="text/css" />[/code]<br/><h3>2.用@import规则：</h3>[code=html]<br/><style><br/>@import url(style.css);<br/></style><br/>[/code]<br/><p>@import 可以放在页面的style标签里面，也可以方式在css样式表里面。</p><p>如果放在css样式文件里面，它必须在其他样式规则的最前面，否则将会无效。</p><br/><h3>3.用style元素</h3><p>你可以将任何css样式放置在页面任何位置，但是需要将样式放置在style标签里面</p>[code=html]<br/><style><br/>p {margin: 0 0 20px 0;}<br/></style><br/>[/code]<br/><p>建议将其放置在head标签里面。</p><br/><h3>4.用内联样式</h3><p>内联样式可以允许你将任何css样式应用于页面的任何标签上，这些样式仅仅应用于当前样式，如下：</p>[code=html]<p style="color: red; padding: 20px;">这里是一些文本</p>[/code]<br/><br/><h3>总结：</h3><p>一般来说，第一种方法是比较好的方法，也是用的最广泛的方法。</p><p>@import方法，可以查看linxz写的一篇文章诡异的@import 能够更好的帮你理解。</p><p>后面两种方法是最不推崇的方法，一般不要用这两种方法，他们既不利于样式的重用，也不利于后期的修改。</p><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/622.html" target="_blank">继续阅读《在web页面中引用css的四种方法》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=CSS">CSS</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=style">style</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/622.html#comment" target="_blank">添加评论</a>(1)</p><h3>相关文章:</h3><ul><li><a href="http://www.xunzou.com/blog/post/621.html">@Font-face 用法及全部浏览器支持的方法</a> (2011-6-8 17:33:53)  </li><li><a href="http://www.xunzou.com/blog/post/615.html">Css content属性详解</a> (2010-7-6 18:54:17)  </li><li><a href="http://www.xunzou.com/blog/post/607.html">视频播放缩略图增加播放按钮</a> (2010-3-8 18:5:27)  </li><li><a href="http://www.xunzou.com/blog/post/605.html">css属性之clip</a> (2010-2-25 15:46:54)  </li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/622.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=622</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=622&amp;key=04f4a466</trackback:ping></item><item><title>@Font-face 用法及全部浏览器支持的方法</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/621.html</link><pubDate>Wed, 08 Jun 2011 17:33:53 +0800</pubDate><guid>http://www.xunzou.com/blog/post/621.html</guid><description><![CDATA[<h3>@Font-face基本介绍：</h3>:<br/><p>@font-face 是一个css2的一个语法，它允许你在网页上显示一个自定义的字体。即使客户机器上可以没有安装这种字体，网页也可以显示。 </p><p>本文将介绍@font-face的基本用法，以及在所有浏览器都能使用的方法。</p><h3>@Font-face基本语法：</h3>:<br/><textarea class="code" rows="10" cols="50">
@font-face&nbsp;{&nbsp;&nbsp;&nbsp;font-family:&nbsp;&lt;a-remote-font-name&gt;;&nbsp;&nbsp;&nbsp;src:&nbsp;&lt;source&gt;&nbsp;[,&lt;source&gt;]*;&nbsp;&nbsp;&nbsp;[font-weight:&nbsp;&lt;weight&gt;];&nbsp;&nbsp;&nbsp;[font-style:&nbsp;&lt;style&gt;];&nbsp;}
</textarea><br/><p>具体介绍请移步到这里：https://developer.mozilla.org/en/css/@font-face</p><p>一个例子：</p><textarea class="code" rows="10" cols="50">
@font-face&nbsp;{&nbsp;&nbsp;&nbsp;font-family:&nbsp;MyHelvetica;&nbsp;&nbsp;&nbsp;src:&nbsp;local("Helvetica&nbsp;Neue&nbsp;Bold"),&nbsp;&nbsp;&nbsp;local("HelveticaNeue-Bold"),&nbsp;&nbsp;&nbsp;url(MgOpenModernaBold.ttf);&nbsp;&nbsp;&nbsp;font-weight:&nbsp;bold;
}
</textarea><br/><p>font-family是字体的名称，src是字体的路径，可以是客户本机字体，也可以是服务器上的字体。</p><h3>@Font-face目前浏览器的兼容性：</h3>:<br/><ul><li>Webkit/Safari(3.2+)：TrueType/OpenType TT (.ttf) 、OpenType PS (.otf)；</li><li>Opera (10+)：    TrueType/OpenType TT (.ttf) 、 OpenType PS (.otf) 、 SVG (.svg)；</li><li>Internet Explorer： 自ie4开始，支持EOT格式的字体文件；ie9支持WOFF；</li><li>Firefox(3.5+)： TrueType/OpenType TT (.ttf)、 OpenType PS (.otf)、 WOFF (since Firefox 3.6) </li><li>Google Chrome：TrueType/OpenType TT (.ttf)、OpenType PS (.otf)、WOFF since version 6</li></ul><p>由上面可以得出：.eot + .ttf /.otf + svg + woff = 所有浏览器的完美支持。</p><br/><h3>@Font-face 让所有浏览器都兼容的方法：</h3><br/><p>有一个专门用于@font-face 的字体网站：<a href="http://www.fontsquirrel.com/fontface/generator" target="_blank">http://www.fontsquirrel.com/fontface/generator</a> </p><p> fontsquirrel 网站提供了一个免费的 <strong>@font-face Kit Generator</strong>工具，可以生成不同的字体格式，并且直接用css和html给出demo。使你可以直接引用到你的网站上。你可以直接使用 fontsquirrel 网站提供 的一些字体，也可以上传你自己的字体还是用。</p><br/><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2011/6/2011060817361017851.png" alt="" title=""/><br/>@font-face Kit Generator demo <br/><a href="http://www.xunzou.com/demo/font-face/Chopin-Script-fontfacekit/demo.html">http://www.xunzou.com/demo/font-face/Chopin-Script-fontfacekit/demo.html</a><br/>@font-face Kit Generator demo <br/><a href="http://www.font2web.com/">http://www.font2web.com/</a><br/><br/>@font-face demo<br/><a href="http://www.xunzou.com/demo/font-face/font-face.html">http://www.xunzou.com/demo/font-face/font-face.html</a><br/><br/><br/><h3>其它font服务：</h3>Google font API，也是一个不错的字体服务，另外一些字体替换还有cufon等。<br/>Google font API 可以参考之前的一片文章：http://www.xunzou.com/blog/post/619.html <br/><br/><h3>参考资料：</h3><ol><li>http://webfonts.info/wiki/index.php?title=%40font-face_browser_support </li><li>https://developer.mozilla.org/en/css/@font-face </li><li>http://www.miltonbayer.com/font-face/</li><li>http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/</li><li>http://www.fontsquirrel.com/fontface/generator</li></ol><br/><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/621.html" target="_blank">继续阅读《@Font-face 用法及全部浏览器支持的方法》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=font">font</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=CSS">CSS</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/621.html#comment" target="_blank">添加评论</a>(5)</p><h3>相关文章:</h3><ul><li><a href="http://www.xunzou.com/blog/post/622.html">在web页面中引用css的四种方法</a> (2011-11-30 15:4:58)  </li><li><a href="http://www.xunzou.com/blog/post/619.html">google font API 使用指南</a> (2011-2-23 15:31:37)  </li><li><a href="http://www.xunzou.com/blog/post/615.html">Css content属性详解</a> (2010-7-6 18:54:17)  </li><li><a href="http://www.xunzou.com/blog/post/607.html">视频播放缩略图增加播放按钮</a> (2010-3-8 18:5:27)  </li><li><a href="http://www.xunzou.com/blog/post/605.html">css属性之clip</a> (2010-2-25 15:46:54)  </li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/621.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=621</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=621&amp;key=44441b81</trackback:ping></item><item><title>Html5初探（1）——HTML5新增标签及属性</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/620.html</link><pubDate>Sat, 12 Mar 2011 16:19:01 +0800</pubDate><guid>http://www.xunzou.com/blog/post/620.html</guid><description><![CDATA[<p>HTML5已经出来了很长时间了，最近也终于有空写一下HTML5的一些内容。本文主要了解一下HTML5新增加的一些标签及属性。</p><h2>HTML5增加了一些新的标签，</h2><p>HTML5新增加的标签主要有： article、aside、audio、canvas、command、datalist、details、embed、figcaption、figure、footer、header、hgroup、keygen、mark、meter、nav、output、progress、ruby、section、summary、time、video、source、wbr </p><p>下面来对一些标签进行介绍</p><h3>article</h3><p>article标签表示一篇文章、博客日志等，实例代码如下：</p>[code=html]<br/><article><br/><h4>这是我的第一篇博客文章</h4><p>html5是一项新的技术。</p><p>html5是一项新的技术。</p></article><br/>[/code]<br/><br/><h3>aside</h3><p>aside标签用于定义一个与主要内容有关的辅助性内容。</p><h3>audio</h3><p>audio标签html5新增加的一个新的标签，用于显示网页上的声音媒体，之前都是借助第三方插件来实现网页声音。目前有是三种声音格式在html5里能被支持，.Ogg， .MP3 和 .WAV。audio标签的基本格式如下</p>[code=html]<br/><audio src="newsong.ogg" controls="controls"><br/>	<p>Y你的浏览器不支持video,请更新你的老爷车浏览器。</p></audio> <br/>[/code]<br/><h4>audio 标签的属性</h4><p>audio有5个属性src、loop、preload、autopaly、controls；</p><p>src有一个值“url”，用来定义一个音频地址、以是本地地址、也可是是远程服务器的地址</p><p> loop有一个值“loop”定义音频是否重复播放。</p><p> preload表示音频是否预先加载。它有三个值：</p><ul>	<li>auto值表示： 页面一打开就开始加载；</li><li>Metadata值表示： 页面不预先开始加载，但是音频文件的一些属性信息可以加载，比如文件大小、第一帧等信息；</li><li> none值表示：不预先加载。</li></ul><p> autopaly有一个值“autoplay”，定义视频自动播放。如果定义了这个属性，将会覆盖上面的preload属性。</p><p> controls有一个值“controls”，定义音频的控制按钮，比如播放、暂停、音量等。</p><br/><h3>canvans</h3><p> canvans标签用于定义一个图形，使得web开发人员不用借助三方插件（flash、Silverlight）来完成图像的制作，而是直接使用javascript脚本来绘图。Canvans标签有宽、高属性</p><p>关于canvans绘图的一些内容，详细可点击这里查看IBM的教程：<a href="http://www.ibm.com/developerworks/cn/web/1012_linlin_html5canvas/">使用 HTML5 canvas 进行 Web 绘图</a></p><h3> command </h3><p> command标签用于定义命令按钮。实例代码</p>[code=html]<br/><command type="command">Click here for more info on HTML5!</command> <br/>[/code]<br/><p> command有5个属性type=command/radio/checkbox、checked= checked、disabled=disabled、label=[ command name]、icon=[一个url]、radiogroup=[ radiogroup的名字]</p><br/><h3>datalist</h3><p> datalist标签用于定义一个下啦列表，示例代码如下：</p>[code=html]<br/><input list="Cellphones" /><br/>      <datalist id=" Cellphones "><br/>        <option value="BENQ">        <option value="BLACKBERRY">        <option value="ERICCSSON">        <option value="FLY">        <option value="HTC">      </datalist> <br/>[/code]<br/><br/><h3>details</h3><p> details标签用于定义关于一个文档的详细说明。Details有一个属性open值为open。</p><br/><h3>embed</h3><p> embed标签用于定义一个外部的内容或插件，可以是任何的媒体文件。</p><br/><h3> footer </h3><p>footer标签用来定义一个页脚/页面底部。可以是整个网页的footer，也可是一个section的footer。</p><br/><h3> header </h3><p>header标签用来定义一个页脚/页面底部。可以是整个网页的header，也可是一个section的header。</p><br/><h3> hgroup </h3><p> hgroup标签用来定义一组标题。比如：</p>[code=html]<br/>	<hgroup><br/>		<h1>冰剑blog</h1>		<h2>专注于web前端开发</h2></hgroup><br/>[/code]<br/><br/><h3> nav </h3><p> nav 标签用来定义一个导航。可以是整个网页的导航，也可是一个section的导航。</p>[code=html]<br/>	<nav>这是一个mark标签的例子，这里需要<mark>标记</mark>一下。</p>[/code]<br/><br/><h3> meter</h3><p> meter标签是用来测量一个范围。有一个预先定义的最小值喝最大值。必须预先指定一个范围。有最小值喝最大值。</p>[code=html]<br/>	<p>你的分数： <meter value="93" min="0" max="100" low="50" high="90" optimum="100">A+</meter></p>[/code]<br/><p>high值为一个数值，表示这个定义的范围的最高部分；</p><p>low 值为一个数值，表示这个定义的范围的最低部分；</p><p>max值为一个数值，表示这个定义的最大值；默认为1</p><p>min 值为一个数值，表示这个定义的最小值；默认为0</p><p> optimum值为一个数值，表示这个定义的范围的最佳值、最好值；</p><p> value 值为一个数值，表示这个定义的实绩值；</p><br/><h3>output</h3><p> output标签是用来显示通过指令计算出来的结果</p><br/><h3>progress</h3><p> progress标签是用来显示一个进度。它包含两个属性：value 表示的是当前进度；max表示一个任务或工程的总量，是一个必须的属性。</p><br/><h3> section </h3><p> section 表示一个页面文档的一部分，包括header、footer、article等。</p><br/><h3>summary</h3><p> summary标签是用来显示一个摘要，它是details标签的一个子元素，也就是说，它必须和details标签一起使用。</p>[code=html]<br/>	<details><br/>		<summary>冰剑blog</summary><br/>		专注于web前端开发<br/></ details ><br/>[/code]<br/><br/><h3>time</h3><p> time标签是用来显示一个日期，或者时间。</p>[code=html]<br/>	<p> 我大概 <time>09:00</time>到达。 </p> 	<p> I have an appointment with doctor on date <time datetime="2010-09-02"> day</time>.</p> [/code]<br/><br/><h3>video</h3><p> video标签是用来显示一个视频。Source 是video标签的一个子元素，用来显示视频来源。Source 的type属性来显示视频的类型。Video示例代码如下：</p>[code=html]<br/>	<video controls="true" height="295" width="480"><br/>     <!-- hello iOS, Safari and IE9 --><br/>     <source src="chris.mp4" type="video/mp4" /><br/>     <!-- Hello Chrome and Firefox (and Opera?) --><br/>     <source src="chris.webm" type="video/webm" /><br/>     <!-- Hello Firefox and Opera --><br/><source src="chris.ogv" type="video/ogg" /><br/>     <!-- Hello legacy --><br/>     <a href="#">你的浏览器不支持video标签，点击这里查看视频</a><br/></video><br/> [/code]<br/><br/><br/><h2>总结：</h2><p>写关于HTML5方面的东西，可能会有一些错误或者不当的地方。欢迎大家在下面的评论里和我交流！</p><p>本文由冰剑原创文章。转载请注明出处，来自<a href="http://www.xunzou.com/blog/">冰剑blog</a>。</p><br/><br/><h2>一些HTML5的参考资料：</h2><p>IBM-- HTML5专题：<a href="http://www.ibm.com/developerworks/cn/web/lp/html5/">http://www.ibm.com/developerworks/cn/web/lp/html5/</a></p><br/><p>W3C-- HTML5：<a href="http://www.w3.org/TR/html5/"> http://www.w3.org/TR/html5/</a></p><br/><p>W3C-- HTML5 Reference ：<a href="http://dev.w3.org/html5/html-author/">  http://dev.w3.org/html5/html-author/</a></p><br/><p>HTML5 Tag Reference ：<a href="http://www.w3schools.com/html5/html5_reference.asp">  http://www.w3schools.com/html5/html5_reference.asp</a></p><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/620.html" target="_blank">继续阅读《Html5初探（1）——HTML5新增标签及属性》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=HTML5">HTML5</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/620.html#comment" target="_blank">添加评论</a>(13)</p><p><a href="http://www.xunzou.com/blog/post/620.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/620.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=620</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=620&amp;key=d3092ee5</trackback:ping></item><item><title>google font API 使用指南</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/619.html</link><pubDate>Wed, 23 Feb 2011 15:31:37 +0800</pubDate><guid>http://www.xunzou.com/blog/post/619.html</guid><description><![CDATA[<p>最近一个客户的网站用了一个非标准的字体，客户要求用google font API来替换这个非标准字体。由于之前没有做过这个，就上google上找了找网站，现将使用方法分享给大家。</p><h3> google font API 是什么呢？</h3>	<p> google font API 是google推出的一款支持高质量的开源字体文件的服务。</p><p>网站地址：http://code.google.com/apis/webfonts/ </p><p>字库地址：http://www.google.com/webfonts </p><h3>怎样使用google font API ?</h3><p>第一步：在你的html页面里面像添加普通样式表一样，添加字体的样式连接。这里以“Fontdiner Swanky”字体为例：</p>[code=html]<br/><link href='http://fonts.googleapis.com/css?family=Fontdiner+Swanky' rel='stylesheet' type='text/css'>[/code]<br/><p>第二部，在需要使用字体的地方用font-family给元素定义样式：</p>[code=css]<br/>h3{font-family: 'Fontdiner Swanky', arial, serif; }<br/>[/code]<br/><p>Ok，现在打开你的页面浏览就可以看到字体变成“Fontdiner Swanky”字体了。</p><p>注意，大家看到font-family里面不仅仅只写了一个字体，是因为我要给我们的h3留个备选字体，如果某些原因导致了google font api不能工作，我们的元素也有备选字体。其实我们在平时的页面制作中也应该这样做。</p><br/><h3>使用google font API 的好处 </h3><ol>	<li>不必使用一些cufon等之类的字体替换，或者背景图替换，减少了页面对服务器的连接数；</li>	<li>使用的是google的cdn,而不是服务器上传的字体，减轻了服务器的流量压力；</li>	<br/><li>元素里面用的是普通文本，即使没有样式，或者使用屏幕阅读器，都能看到内容。</li></ol><h3> google font API 的其它用法</h3><p>上面只是介绍了google font API的一个普通的用法，如果有一个以上的字体呢？并且字体还有bold，italic等属性，当然google也考虑到了，下面介绍一些复杂的用法。</p><p>多种字体：</p>[code=html]<br/><link href='http://fonts.googleapis.com/css?family=Tangerine|Inconsolata|Droid+Sans' rel='stylesheet' type='text/css'>[/code]<br/><p>上面我们可以看到family后面有三种字体，每个字体之间用“|”隔开，不要有任何空格。第三个字体中间有加号，因为有的字体名字中间有空格，这里需要将空格转换为“+”</p><p>字体多种样式：</p>[code=html]<br/><link href='http://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic|Inconsolata:italic|Droid+Sans' rel='stylesheet' type='text/css'>[/code]<br/><p>上面我们可以看到family后面的字体“Tangerine”后面有个冒号，后面是bold, bolditalic ，这就是字体的样式，加粗，加粗斜体。</p><p>注意，这里的每个字体样式之间用“,”(逗号)隔开。</p><p>上面的bold, ,bolditalic 等也可以缩写：</p>斜体：italic可以写为italic或者i；<br/>粗体：bold可以写为bold或者b；<br/>加粗斜体bold italic可以写为bolditalic 或者 bi。<br/><br/><h3> 总结</h3><p>google font api 能够在绝大多数的浏览器里运行，并且不依赖于javascript。它里面的字体都是开源字库，所以，你可以随意的使用。</p><p>但是 它也有一定的局限性。目前字体还比较少，不支持中文字体。</p><p>如果你有什么问题，欢迎在下面的评论里与我交流。</p><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/619.html" target="_blank">继续阅读《google font API 使用指南》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=google">google</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=font">font</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=api">api</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/619.html#comment" target="_blank">添加评论</a>(5)</p><h3>相关文章:</h3><ul><li><a href="http://www.xunzou.com/blog/post/621.html">@Font-face 用法及全部浏览器支持的方法</a> (2011-6-8 17:33:53)  </li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/619.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=619</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=619&amp;key=c76737f4</trackback:ping></item><item><title>自适应浏览器窗口的页面背景</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/618.html</link><pubDate>Wed, 29 Dec 2010 17:03:03 +0800</pubDate><guid>http://www.xunzou.com/blog/post/618.html</guid><description><![CDATA[<p>最近在做的一个项目中，客户要求网页的背景不管客户浏览器大小多大， 背景都要铺满全屏。在网上找了一下，有人已经研究出来了方法，不用js就可以做到。下面看代码：</p><strong>CSS代码：</strong><br/>[code=css]<br/>html, body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;}<br/>body {/*为页面body添加一些基本信息*/<br/>	font-family:Arial, Helvetica, sans-serif;<br/>	font-size:14px;<br/>	color:#FFFFFF;<br/>	background:#DDDAD9;<br/>}<br/>#wrap{position:absolute;width:100%; height:100%;top:0; left:0; overflow:auto;overflow-x: hidden; z-index:2;}<br/>#background {position:absolute; z-index:-1; width:100%; height:100%;}<br/>.container{width:960px;margin:0 auto;}<br/>[/code]<br/><strong>HTML结构代码：</strong><br/>[code=html]<br/><div id="wrap">	<div class="container">		<div id="header">			这里是header<br/>		</div>		<div id="content">			这里是Main content<br/>		</div>		<div id="footer">			这里是footer<br/>		</div>	</div></div><img src="bg.jpg" id="background" alt="" /><br/> [/code]<br/><p>解释一下上面的css和html，这个其实就是将html和body的滚动条取消，用div#wrap容器来模拟页面的滚动条。其实并不是用图片做背景的，是将background的图片z-index设置为-1；使它放在wrap页面的底部，这样既覆盖了body的背景色和背景图（如果有），又使内容区域的最上面。</p><p><a href="http://www.xunzou.com/demo/fullbg/fullbg1.html" class="webdemo">点此查看demo</a></p><p>这样看起来没啥问题了，挺好。</p><br/><p>但是，但是客户的要求是千变万化的，客户说：如果我的img的src地址出错了，怎么办，这样把，我再在body里面增加一个bg吧。然后css就变成了这样：</p>[code=css]<br/>	body {<br/>	font-family:Arial, Helvetica, sans-serif;<br/>	font-size:14px;<br/>	color:#FFFFFF;<br/>	background:#DDDAD9 url(images/bg.png) no-repeat center top;<br/>}<br/>[/code]<br/><p><a href="http://www.xunzou.com/demo/fullbg/fullbg2.html" class="webdemo">点此查看#background没有背景的demo</a></p><br/><p>但是，但是客户看了之后说：这个背景图要随着内容变化，也变化，不能让它固定在浏览器窗口上面。于是，再搜索信息，再修改：</p><p>在网上找到了一个外国佬写的一个Jquery插件<a href="http://bavotasan.com/downloads/full-sizebackground-image-jquery-plugin/">Full Size Background Image jQuery Plugin</a></p><p>他做的一个demo： <a href="http://bavotasan.com/downloads/full-sizebackground-image-jquery-plugin/">Full Size Background Image jQuery Plugin DEMO</a></p>具体使用方法：<br/><strong>CSS代码：</strong><br/>[code=css]<br/>html {height:100%;}<br/>body {/*为页面body添加一些基本信息*/<br/>	font-family:Arial, Helvetica, sans-serif;<br/>	font-size:14px;<br/>	height:100%;<br/>line-height:1.5;<br/>	color:#FFFFFF;<br/>#background {<br/>position: fixed;<br/>top: 0;<br/>left: 0;<br/>overflow: hidden;<br/>width: 100%;<br/>height: auto;<br/>z-index: -1;<br/>overflow: hidden;<br/>}<br/>#wrap{position:absolute;width:100%;height:100%;top:0; left:0; z-index:2;}<br/>.container{width:960px;margin:0 auto;}<br/>[/code]<br/><strong>HTML结构代码：</strong><br/>[code=html]<br/><div id="wrap">	<div class="container">		<div id="header">			这里是header<br/>		</div>		<div id="content">			这里是Main content<br/>		</div>		<div id="footer">			这里是footer<br/>		</div>	</div></div><img src="bg.jpg" id="background" alt="" /><br/> [/code]<br/><br/><p>但是他这个插件有一个问题，当页面内容高度超过一个屏幕的高度，在ie6浏览器下会出现问题，背景图片只出现在了当前页面的当前窗口，当拉动页面右边的滚动条的时候，下面就没有背景了。请分别在ie6和其它浏览器里浏览：</p><p><a href="http://www.xunzou.com/demo/fullbg/fullbg4.html" class="webdemo">点此查看demo</a></p><p>并且当添加的图片背景不存在的时候，ie6浏览器页面底部会出现一大块空白，查看下面没有背景的demo, 请分别在ie6和其它浏览器里浏览：</p><p><a href="http://www.xunzou.com/demo/fullbg/fullbg3.html" class="webdemo">点此查看demo</a></p><br/>于是又对页面css进行修改：<br/>[code=css]<br/>html {height:100%;_overflow:hidden;}增加overflow:hidden;<br/>#wrap{position:absolute;width:100%;height:100%;top:0;left:0;_overflow:auto;_overflow-x:hidden; z-index:2;}<br/>[/code]<br/><p>添加了上面的代码之后，解决了上面的问题，当页面内容高度超过一个屏幕的高度的时候，ie6下面不会再出现问题，请看demo：</p><p><a href="http://www.xunzou.com/demo/fullbg/fullbg5.html" class="webdemo">点此查看demo</a></p><p>但是由于在ie6下面这是用wrap模拟的滚动条，所以在ie6页面下，当#background标签没有图片的时候，body背景图会固定在窗口里不变。请看demo：</p><p><a href="http://www.xunzou.com/demo/fullbg/fullbg6.html" class="webdemo">点此查看demo</a></p><br/><p><strong>总结：</strong></p><p>文章前两个demo没有用js，纯css写的，唯一不足之处就是：当页面#background没有图片的时候，拉动右边滚动条，body的背景是不变的。</p><p>文章后面四个demo用了js，不足之处就是：ie6浏览器会出现一些问题，当然如果不考虑ie6的话，就可以这里的4个demo中的任意一个了。</p><p>其实这里我们考虑的body的背景问题，如果不考虑body的背景问题的话，我们完全可以用纯css的那个demo。</p><p>如果你有什么好的意见和建议，欢迎在下面的评论处与我交流。</p><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/618.html" target="_blank">继续阅读《自适应浏览器窗口的页面背景》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=background">background</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=fullbg">fullbg</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/618.html#comment" target="_blank">添加评论</a>(4)</p><p><a href="http://www.xunzou.com/blog/post/618.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/618.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=618</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=618&amp;key=40abeb2c</trackback:ping></item><item><title>blockquote 引用的分析</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/617.html</link><pubDate>Sat, 27 Nov 2010 00:10:36 +0800</pubDate><guid>http://www.xunzou.com/blog/post/617.html</guid><description><![CDATA[<p>平时我们在制作页面的时候，总是会碰到这样那样的引用，比如引用某人的一句话，或者引用一些名言警句，我们可以用一些引号将其特殊区分开来。现对平时遇到的一些引用的相关例子进行一些分析：</p><b>例子1：</b><br/><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/11/201011270013275611.jpg" alt="" title=""/><br/><b>例子2：QQ空间的一些好友说的话</b><br/><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/11/201011270014181010.jpg" alt="" title=""/><br/>下面提供四种类似的解决方法：<br/><h3>第一种实现方法：</h3><p>用blockquote来做左边引号的背景，用p来做右边的背景</p><b>HTML代码：</b><br/>[CODE=html]<br/><blockquote class="bq1"><br/>        	<p>10M的网卡中只有四根弹片，8根线中另四根不起作用所以要求低，两边是同一顺序就行，但最好按规范做；100M的网卡中有8根弹片，四根用于数据传输，另四根用于防串扰，严格按照规范做线能减少网络故障。 </p>        </blockquote><br/>[/CODE]<br/><b>CSS代码：</b><br/>[CODE=css]<br/>.box .bq1 {<br/>	color:#333;<br/>	background:#ccc url(images/quotebefore.gif) no-repeat 10px 10px;<br/>	text-indent:30px;<br/>	padding:10px;<br/>	margin:50px 0;<br/>}<br/>.box .bq1 p {<br/>	margin:0;<br/>	background:url(images/quoteafter.gif) no-repeat right bottom;<br/>}<br/>[/CODE]<br/><br/><h3>第二种实现方法：</h3><p>用blockquote来做左边引号的背景，用一个空标签，比如span来做右边引号的背景，将span设置为left或者right的padding，然后给span加背景。</p><b>HTML代码：</b><br/>[CODE=html]<br/><blockquote class="bq2">10M的网卡中只有四根弹片，8根线中另四根不起作用所以要求低，两边是同一顺序就行，但最好按规范做；100M的网卡中有8根弹片，四根用于数据传输，另四根用于防串扰，严格按照规范做线能减少网络故障。<span></span></blockquote> [/CODE]<br/><b>CSS代码：</b><br/>[CODE=css]<br/>.box .bq2{<br/>	color:#333;<br/>	background:#ccc url(images/quotebefore.gif) no-repeat 10px 10px;<br/>	text-indent:30px;<br/>	padding:10px;<br/>	margin:50px 0;<br/>}<br/>.box .bq2 span {<br/>	padding:0 0 0 25px;<br/>	background:url(images/quoteafter.gif) no-repeat;<br/>}<br/><br/> [/CODE]<br/><br/><br/><h3>第三种实现方法：</h3><p>用blockquote的after和before伪类来做两个前后的引号。不过ie6不支持。</p><b>HTML代码：</b><br/>[CODE=html]<br/><blockquote class="bq3">10M的网卡中只有四根弹片，8根线中另四根不起作用所以要求低，两边是同一顺序就行，但最好按规范做；100M的网卡中有8根弹片，四根用于数据传输，另四根用于防串扰，严格按照规范做线能减少网络故障。</blockquote><br/> [/CODE]<br/><b>CSS代码：</b><br/>[CODE=css]<br/>.box .bq3 {<br/>	background:#666;<br/>	color:#CCC;<br/>	margin:0;<br/>	padding:20px 10px;<br/>}<br/>.box .bq3:before, .box .bq3:after {<br/>	display:inline-block;<br/>	height:16px;<br/>	font-size:40px;<br/>	vertical-align:-16px; /*修复位置*/<br/>	line-height:20px;<br/>	content:"“";<br/>	color:#000;<br/>}<br/>.box .bq3:after {<br/>	content:"”";<br/>}<br/><br/> [/CODE]<br/><br/><br/><h3>第四种实现方法：</h3><p>在blockquote里面增加两个标签，在标签里用文字的引号。</p><b>HTML代码：</b><br/>[CODE=html]<br/><blockquote class="bq4"><strong>“</strong>10M的网卡中只有四根弹片，8根线中另四根不起作用所以要求低，两边是同一顺序就行，但最好按规范做；100M的网卡中有8根弹片，四根用于数据传输，另四根用于防串扰，严格按照规范做线能减少网络故障。<strong>”</strong></blockquote><br/> [/CODE]<br/><b>CSS代码：</b><br/>[CODE=css]<br/>.box .bq4 {<br/>	color:#333;<br/>	background:#ccc;<br/>	padding:10px;<br/>	margin:50px 0;<br/>}<br/>.box .bq4 strong {<br/>	font-size:36px;<br/>	*font-size:28px;<br/>	font-family:Arial, Consolas;<br/>	display:inline-block;<br/>	display: -moz-inline-stack;/*firefox 2 的display inline-block */<br/>	line-height:38px;<br/>	*line-height:30px;<br/>	height:16px;<br/>	overflow:hidden;<br/>	vertical-align:-1px;<br/>	*vertical-align:6px;<br/>	color:#999999;<br/>}<br/><br/> [/CODE]<br/><br/><br/><p>以上四种方法，只是个人总结，如果你有更好的建议或方法，可以留言共同探讨</p><p>查看demo：<a href="http://www.xunzou.com/demo/blockquote/blockquote.html" target="_blank">http://www.xunzou.com/demo/blockquote/blockquote.html</a> </p><br/><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/617.html" target="_blank">继续阅读《blockquote 引用的分析》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=blockquote">blockquote</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/617.html#comment" target="_blank">添加评论</a>(5)</p><p><a href="http://www.xunzou.com/blog/post/617.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/617.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=617</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=617&amp;key=4f0c2216</trackback:ping></item><item><title>一款JQuery Slider 插件----bxSlider</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/616.html</link><pubDate>Mon, 15 Nov 2010 21:31:14 +0800</pubDate><guid>http://www.xunzou.com/blog/post/616.html</guid><description><![CDATA[<p>今天在做一个页面的时候，需要一个Slider的效果，由于客户要求要用Jquery来做，就想着去网上找一个方便的，实用的Slider插件。</p><p>bxSlider 是一个 jQuery 的插件，它可以实现 Slider 和滚动效果。这个插件使用非常简单，并且也比较小，是一个轻量级的Jquery插件。</p><h2>bxSlider使用：</h2><p>要使用bxSlider，必须先下载Jquery的库，你可以在这里下载：www.JQuery.com。当然，你也可以直接使用下面的CDN。链接到你的页面即可：</p><dl><dt>jQuery CDN</dt>     <dd>http://code.jquery.com/jquery-1.4.4.min.js Minified version</dd>     <dd>http://code.jquery.com/jquery-1.4.4.js Source version</dd><br/><dt>Google Ajax API CDN</dt><br/>     <dd>https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js</dd><dt>Microsoft CDN</dt><br/>   <dd> http://ajax.microsoft.com/ajax/jquery/jquery-1.4.4.min.js</dd></dl><p>下载bxSlider插件：</p><a href="http://bxslider.com/jquery.bxSlider.zip" target="_blank">http://bxslider.com/jquery.bxSlider.zip</a><br/><br/><p>查看相关demo</p><a href="http://bxslider.com/" target="_blank">http://bxslider.com/</a><br/><br/><p>下载完成后：</p>在你的页面head区域添加：<br/>[CODE=html]<br/><link rel="stylesheet" type="text/css" href="bx_styles/bx_styles.css" /><script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script><br/><script src="jquery.bxSlider.min.js" type="text/javascript"></script><br/><br/><script type="text/javascript"><br/>  $(document).ready(function(){<br/>    $('#slider1').bxSlider();<br/>  });<br/></script><br/>[/CODE]<br/>html代码如下：<br/>[CODE=html]<br/><ul id="slider1">  <li>    <h2>hello i am the first header!</h2>    <p>and i am some groovy body text.</p>  </li>  <li>    <h2>hello i am the second header!</h2>    <p>and i am some more groovy body text.</p>  </li></ul>[/CODE]<br/><h2>bxSlider 详细配置参数：</h2><p>bxSlider有很多配置参数，使你能够用参数制作出各种各样的slider效果：</p>[code=html]<br/>mode: 'horizontal',                 // 'horizontal', 'vertical', 'fade' 定义slider滚动的方向，有三个值可供选择<br/>infiniteLoop: true,                 // true, false - display first slide after last 无限循环<br/>hideControlOnEnd: false,            // true, false - if true, will hide 'next' control on last slide and 'prev' control on first 如果设置true，将会在最后一个幻灯片隐藏“next”，在最前面的幻灯片因此“prev”<br/>controls: true,                     // true, false - previous and next controls 是否显示“previous”和“next”按钮<br/>speed: 500,                         // integer - in ms, duration of time slide transitions will occupy   速度，单位为毫秒<br/>easing: 'swing',                    // used with jquery.easing.1.3.js - see http://gsgd.co.uk/sandbox/jquery/easing/ for available options<br/>pager: true,                        // true / false - display a pager<br/>pagerSelector: null,                // jQuery selector - element to contain the pager. ex: '#pager'<br/>pagerType: 'full',                  // 'full', 'short' - if 'full' pager displays 1,2,3... if 'short' pager displays 1 / 4   如果设置full，将显示1，2，3……，如果设置short，将显示1/4 .<br/>pagerLocation: 'bottom',            // 'bottom', 'top' - location of pager 页码的位置<br/>pagerShortSeparator: '/',           // string - ex: 'of' pager would display 1 of 4 页面分隔符<br/>pagerActiveClass: 'pager-active',   // string - classname attached to the active pager link 当前页码的className<br/>nextText: 'next',                   // string - text displayed for 'next' control 下一页的文字<br/>nextImage: '',                      // string - filepath of image used for 'next' control. ex: 'images/next.jpg' 可以设置下一页为图片<br/>nextSelector: null,                 // jQuery selector - element to contain the next control. ex: '#next'<br/>prevText: 'prev',                   // string - text displayed for 'previous' control 上一页的文字<br/>prevImage: '',                      // string - filepath of image used for 'previous' control. ex: 'images/prev.jpg' 上一页的图片<br/>prevSelector: null,                 // jQuery selector - element to contain the previous control. ex: '#next'<br/>captions: false,                    // true, false - display image captions (reads the image 'title' tag) 是否显示图片的标题，读取图片的title属性的内容。<br/>captionsSelector: null,             // jQuery selector - element to contain the captions. ex: '#captions'<br/>auto: false,                        // true, false - make slideshow change automatically 幻灯片自动滚动<br/>autoDirection: 'next',              // 'next', 'prev' - direction in which auto show will traverse 自动滚动的顺序<br/>autoControls: false,                // true, false - show 'start' and 'stop' controls for auto show 自动滚动的控制键<br/>autoControlsSelector: null,         // jQuery selector - element to contain the auto controls. ex: '#auto-controls'<br/>autoStart: true,                    // true, false - if false show will wait for 'start' control to activate <br/>autoHover: false,                   // true, false - if true show will pause on mouseover 设置鼠标mouseover将会使自动滚动暂停<br/>autoDelay: 0,                       // integer - in ms, the amount of time before starting the auto show<br/>pause: 3000,                        // integer - in ms, the duration between each slide transition  过渡时间<br/>startText: 'start',                 // string - text displayed for 'start' control 开始按钮的文字<br/>startImage: '',                     // string - filepath of image used for 'start' control. ex: 'images/start.jpg' 开始按钮的图片<br/>stopText: 'stop',                   // string - text displayed for 'stop' control 停止按钮的文本<br/>stopImage: '',                      // string - filepath of image used for 'stop' control. ex: 'images/stop.jpg'   停止按钮的图片<br/>ticker: false,                      // true, false - continuous motion ticker mode (think news ticker)<br/>                                    // note: autoControls and autoControlsSelector apply to ticker!<br/>tickerSpeed: 5000,                  // integer - has an inverse effect on speed. therefore, a value of 10000 will <br/>                                    // scroll very slowly while a value of 50 will scroll very quickly.<br/>tickerDirection: 'next',            // 'next', 'prev' - direction in which ticker show will traverse<br/>tickerHover: false,                 // true, false - if true ticker will pause on mouseover<br/>wrapperClass: 'bx-wrapper',         // string - classname attached to the slider wraper<br/>startingSlide: 0,                   // integer - show will start on specified slide. note: slides are zero based!<br/>displaySlideQty: 1,                 // integer - number of slides to display at once<br/>moveSlideQty: 1,                    // integer - number of slides to move at once<br/>randomStart: false,                 // true, false - if true show will start on a random slide<br/><br/>[/code]<br/><br/><br/><br/><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/616.html" target="_blank">继续阅读《一款JQuery Slider 插件----bxSlider》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=jquery">jquery</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=slider">slider</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/616.html#comment" target="_blank">添加评论</a>(2)</p><p><a href="http://www.xunzou.com/blog/post/616.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/616.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=616</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=616&amp;key=169bd635</trackback:ping></item><item><title>Css content属性详解</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/615.html</link><pubDate>Tue, 06 Jul 2010 18:54:17 +0800</pubDate><guid>http://www.xunzou.com/blog/post/615.html</guid><description><![CDATA[<p><b>Content作为css的一个属性，它可以和伪对象:before :after一起使用。</b></p><p>例如：</p><p>CSS</p>[CODE=css]<br/>.xunzou:before { <br/>        content:"你好啊"; <br/>        color:#F00; <br/>    } <br/>[/CODE]<br/><p>html</p>[CODE=html]<br/><div class="xunzou">欢迎光临我的blog</div>[/CODE]<br/><p>浏览器显示的应该是：</p><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/7/201007061837446041.jpg" alt="" title=""/><br/>这里红色的文字，你好啊，由content生成<br/><br/><p><b>Content 的值还可以设置为元素的属性</b></p><p>例如：</p><p>CSS</p>[CODE=css]<br/>.xunzou2:hover{position:relative;z-index:1}<br/>	.xunzou2:hover:after{<br/>		content:attr(href);<br/>		padding:8px;<br/>		background:#DCDCDC;<br/>		-moz-border-radius:5px;<br/>		-webkit-border-radius:5px;<br/>		border-radius:5px;<br/>		position:absolute;<br/>		left:0;<br/>		top:150%;<br/>		z-index:2<br/>		white-space: nowrap;<br/>		-moz-box-shadow:2px 2px 5px #333;<br/>		-webkit-box-shadow:2px 2px 5px #333;<br/>		box-shadow:2px 2px 5px #333;<br/>	}	<br/>[/CODE]<br/><p>html</p>[CODE=html]<br/><a class="xunzou2" title="点击进入我的blog" >欢迎光临我的blog</a><br/>[/CODE]<br/><p>浏览器显示的应该是：</p><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/7/201007061842555600.jpg" alt="" title=""/><br/><br/><a href="http://www.xunzou.com/demo/csscontent.html" target="_blank">点此查看demo</a><br/><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/615.html" target="_blank">继续阅读《Css content属性详解》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=CSS">CSS</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=content">content</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/615.html#comment" target="_blank">添加评论</a>(5)</p><h3>相关文章:</h3><ul><li><a href="http://www.xunzou.com/blog/post/622.html">在web页面中引用css的四种方法</a> (2011-11-30 15:4:58)  </li><li><a href="http://www.xunzou.com/blog/post/621.html">@Font-face 用法及全部浏览器支持的方法</a> (2011-6-8 17:33:53)  </li><li><a href="http://www.xunzou.com/blog/post/607.html">视频播放缩略图增加播放按钮</a> (2010-3-8 18:5:27)  </li><li><a href="http://www.xunzou.com/blog/post/605.html">css属性之clip</a> (2010-2-25 15:46:54)  </li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/615.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=615</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=615&amp;key=724b5ac7</trackback:ping></item><item><title>css3多列布局模块研究</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/614.html</link><pubDate>Mon, 31 May 2010 17:30:20 +0800</pubDate><guid>http://www.xunzou.com/blog/post/614.html</guid><description><![CDATA[<p>CSS3多列布局模块是css3提出的新的东西，可以将文章分成多列显示。</p><p>下图是应用了column样式后在webkit内核浏览器里的显示效果</p><p>&nbsp;</p><p><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/5/css3column.jpg" alt="" title="" /></p><p>column属性详解：</p><p>多列有四个属性，可以随意用1到4个：</p><ol>	<li> column-count：列数</li>	<li>column-gap：两列中间的空隙;</li>	<li>column-rule：两列中间的分割 比如：1px solid #333;</li>	<li>column-width：每列固定宽度;</li></ol><p>用到的css：</p>[CODE=css]			-webkit-column-count: 3;<br/>				-webkit-column-gap: 10px;<br/>				-webkit-column-rule:5px solid #333;<br/>				-webkit-column-width:100px;<br/><br/>				-moz-column-count: 3;<br/>				-moz-column-gap: 20px;<br/>				-moz-column-rule:5px solid #333;<br/>				<br/>				column-count: 3;<br/>				column-gap: 10px;<br/>				column-rule:5px solid #333;<br/>				column-width:50px;<br/>[/CODE]<br/><p><a href="http://www.xunzou.com/demo/css3column/photo.html#container">查看demo</a>记得用firefox、以及chrome和Safari浏览哦</p><p><a href="http://www.w3.org/TR/css3-multicol/">w3c官方的解释</a></p><p><a href="http://www.css3.info/preview/multi-column-layout/">CSS3info</a></p><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/614.html" target="_blank">继续阅读《css3多列布局模块研究》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=2">前端技术</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=css3">css3</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=column">column</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/614.html#comment" target="_blank">添加评论</a>(4)</p><h3>相关文章:</h3><ul><li><a href="http://www.xunzou.com/blog/post/612.html">用css3创建的3d效果的“带子”</a> (2010-4-24 12:23:30)  </li><li><a href="http://www.xunzou.com/blog/post/609.html">CSS3属性选择符及其伪类</a> (2010-3-13 15:10:41)  </li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/614.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=614</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=614&amp;key=25006dc6</trackback:ping></item><item><title>腾讯微博邀请码十三个（已经全部注册完毕）</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/613.html</link><pubDate>Tue, 11 May 2010 08:26:29 +0800</pubDate><guid>http://www.xunzou.com/blog/post/613.html</guid><description><![CDATA[<p>腾讯微博邀请码曾经一码难求，现在是一码难送，特给大家送一些微博邀请码：</p><p>注册地址：<a href="http://t.qq.com/" target="_blank">http://t.qq.com/</a></p><p><span style="color: rgb(255, 0, 0);"><strong>划删除线的为已经使用过的邀请码，请大家使用过后留言注明一下，方便其他人注册。</strong></span></p><p>&nbsp;8个微博邀请码：</p><p><span style="color: rgb(128, 128, 128);"><strike>http://t.qq.com/invite/fca1a1126d1deb3259c5</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/b25c9135a3b22cadda73</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/f50f0ca41787927c33b1</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/cf9b98a0094cdf6f66b7</strike></span></p><p><span style="color: rgb(128, 128, 128);"><strike>http://t.qq.com/invite/7c9e05dfc370de2b0a55</strike></span></p><p><span style="color: rgb(128, 128, 128);"><strike>http://t.qq.com/invite/5cd3bf2bcec7444da451</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/10fef405f454f9ab1345</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/a2e9e9b686c5709c63e9</strike></span></p><p>请大家用过之后在下面留言，我好标记用过的邀请码。</p><p>刚发完又有5个了，再增加5个：</p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/a50bef60d39001ab6589</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/8f91095181cfcc99bcef</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/eeae2aa54b4a07f1ec9f&nbsp;</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/353598790e29547a000b</strike></span></p><p><span style="color: rgb(153, 153, 153);"><strike>http://t.qq.com/invite/5b6ec30c925a92618885</strike></span></p><p>Copyright © 2008</p><p><a href="http://www.xunzou.com/blog/post/613.html" target="_blank">继续阅读《腾讯微博邀请码十三个（已经全部注册完毕）》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=4">乱七八糟</a> | Tags:  | <a href="http://www.xunzou.com/blog/post/613.html#comment" target="_blank">添加评论</a>(3)</p><p><a href="http://www.xunzou.com/blog/post/613.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>乱七八糟</category><comments>http://www.xunzou.com/blog/post/613.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=613</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=613&amp;key=b6adb5fc</trackback:ping></item></channel></rss>

