<?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>Tue, 06 Jul 2010 19:00:07 +0800</pubDate><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 © 2010 xunzou.com</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>(0)</p><h3>相关文章:</h3><ul><li><a  href="http://www.xunzou.com/blog/post/607.html">视频播放缩略图增加播放按钮</a>&nbsp;&nbsp;(2010-3-8 18:5:27)</li><li><a  href="http://www.xunzou.com/blog/post/605.html">css属性之clip</a>&nbsp;&nbsp;(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 © 2010 xunzou.com</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>(2)</p><h3>相关文章:</h3><ul><li><a  href="http://www.xunzou.com/blog/post/612.html">用css3创建的3d效果的“带子”</a>&nbsp;&nbsp;(2010-4-24 12:23:30)</li><li><a  href="http://www.xunzou.com/blog/post/609.html">CSS3属性选择符及其伪类</a>&nbsp;&nbsp;(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 © 2010 xunzou.com</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><item><title>用css3创建的3d效果的“带子”</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/612.html</link><pubDate>Sat, 24 Apr 2010 12:23:30 +0800</pubDate><guid>http://www.xunzou.com/blog/post/612.html</guid><description><![CDATA[<p>用css3创建的3d效果的“带子” ，其实我也不知道该怎么称呼它。</p><h3>看一下效果吧</h3><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/4/未命名-1.jpg" alt="" title=""/><br/><h4>主要用到了css3的阴影、圆角以及css实现的三角形的等效果</h4><p>关于css3以及css实现三角形的文章：</p><ul><li>[<a target="_blank"  href="http://www.xunzou.com/blog/post/579.html">[整理]css3的一些新特性</a>] </li><li>[<a target="_blank"  href="http://www.xunzou.com/blog/post/478.html">em实现倒三角的提示效果</a>] </li><li>[<a target="_blank"  href="http://www.xunzou.com/blog/post/609.html">CSS3属性选择符及其伪类</a>] </li></ul>css代码：<br/>[CODE=css]<br/>.box {<br/>			width:600px;<br/>			height:350px;<br/>			margin:0 auto;<br/>			padding:30px;<br/>			border:1px solid #666;<br/>		}<br/>	.innerbox {<br/>			width:260px;<br/>			height:280px;<br/>			color:#333;<br/>			background:#ccc;<br/>			margin:0 auto;<br/>			padding:50px 10px 0;<br/>			border:1px solid #333;<br/>			border-radius:10px;/*opera 、IE9*/<br/>			-moz-border-radius:10px;/*Firefox*/<br/>			-webkit-border-radius:10px;/*Safari、Chrome*/<br/>			border-radius:10px;<br/>			box-shadow:2px 2px 8px #666,-2px -2px 8px #666;/*opera 、IE9*/<br/>			-moz-box-shadow:2px 2px 8px #666,-2px -2px 8px #666;/*Firefox*/<br/>			-webkit-box-shadow:2px 2px 8px #666,-2px -2px 8px #666;/*Safari、Chrome*/<br/>			position:relative;<br/>			}<br/>	.innerbox p{text-indent:2em;line-height:2;font-size:14px;}<br/>	h2 {<br/>		width:302px;<br/>		height:30px;<br/>		line-height:30px;<br/>		background:#fff;<br/>		text-align:center;<br/>		color:#333;<br/>		position:absolute;<br/>		left:-12px;<br/>		top:10px;<br/>		border:1px solid #333;<br/>		box-shadow:2px 2px 8px #333;/*opera 、IE9*/<br/>		-moz-box-shadow:2px 2px 8px #333;/*Firefox*/<br/>		-webkit-box-shadow:2px 2px 8px #333;/*Safari、Chrome*/<br/>		text-shadow:2px 2px 5px #CCC;<br/>		border-radius:5px 5px 0 0;/*opera 、IE9*/<br/>		-moz-border-radius:5px 5px 0 0;/*Firefox*/<br/>		-webkit-border-radius:5px 5px 0 0;/*Safari、Chrome*/<br/>	}<br/>	em {position:absolute;top:42px;width:0;height:0;overflow:hidden;font-size:0;border:5px solid;}/*实现三角形*/<br/>	em.s1{left:-11px;border-color: #333  #333 transparent transparent;}/*实现左三角形*/<br/>	em.s2{right:-11px;border-color: #333  transparent transparent #333;}/*实现右三角形*/<br/>[/CODE]<br/>html代码<br/>[CODE=html]<br/><div class="box">	<div class="innerbox">		<h2>css3创建的3d</h2>		<em class="s1">左阴影</em><br/>		<em class="s2">右阴影</em><br/>		<p>这里是用css3创建的3d绶带，暂且这么叫它吧！</p>		<p>这里是用css3创建的3d绶带，暂且这么叫它吧！</p>	</div></div>[/CODE]<br/><br/>demo地址：<a href="http://www.xunzou.com/demo/ribbon/ribbon.html" target="_blank">http://www.xunzou.com/demo/ribbon/ribbon.html</a><br/><br/><p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/612.html" target="_blank">继续阅读《用css3创建的3d效果的“带子”》的全文内容...</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/post/612.html#comment" target="_blank">添加评论</a>(0)</p><h3>相关文章:</h3><ul><li><a  href="http://www.xunzou.com/blog/post/614.html">css3多列布局模块研究</a>&nbsp;&nbsp;(2010-5-31 17:30:20)</li><li><a  href="http://www.xunzou.com/blog/post/609.html">CSS3属性选择符及其伪类</a>&nbsp;&nbsp;(2010-3-13 15:10:41)</li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/612.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=612</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=612&amp;key=eddf1e26</trackback:ping></item><item><title>命题作文</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/610.html</link><pubDate>Fri, 09 Apr 2010 13:18:50 +0800</pubDate><guid>http://www.xunzou.com/blog/post/610.html</guid><description><![CDATA[<p><br />我们在小学甚至初中的时候，作文课上，老师一般会出一个题目，然后让大家围绕这个题目去作文。<br /><br />比如老师今天布置的作文题目是《蜗牛》，然后说，同学们开始写吧，这样写出来的作文是不是都不一样呢？有的同学可能会写：蜗牛是一种动物，它背着一个壳， 它是世界上脚最多的动物&hellip;&hellip;；也有同学可能会写：蜗牛就像当今的人类，为了一个房子，一辈子就被拴在房子里，啥也干不成，为了这个房子，奋斗一辈子&hellip;&hellip;<br /><br />不同的人对这个题目有不同的理解，你的&ldquo;蜗牛&rdquo;可能并不是我的&ldquo;蜗牛&rdquo;。所以在传达事物的同事，一定要告知，你的蜗牛是长腿的蜗牛，还是背房子的蜗牛。在 一个团队中，有着很多的交流沟通，作为一个团队的舵手、领航员，有责任、有义务告知队友你的蜗牛是干什么的，而不仅仅是给个命题作文，让队友去自由发挥。 自由发挥有的符合老师的要求，自然会的高分；有的不符合要求，那么就会的个差分。这自然不是老师想要的，也不是学生喜欢的。<br /><br />有时候，学生是喜欢他的老师给与一定的指导，给学生列一个提纲，让他知道我写这个作文的目的是什么，并不是没有目的的去&ldquo;创造&rdquo;，去编作文。<br /><br />适当的给与指导，不是让学生去完成这个&ldquo;命题作文&rdquo;的任务，而是让其知道写这篇作文的意义，把它当作自己的事情去做。这样，完成的作文，就会达到老师的满 意，学生的满足（成就感）。在团队中，领航者要使你的队友明白明明白白的去做一件事情，从而和团队共同去完成这个目标，并使其在完成后有成就感，这样队友 才能够更加努力的去做，才能够提升团队的战斗力。<br /><br />&nbsp;</p><p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/610.html" target="_blank">继续阅读《命题作文》的全文内容...</a></p><p>分类: <a href="http://www.xunzou.com/blog/catalog.asp?cate=3">心情日记</a> | Tags: <a href="http://www.xunzou.com/blog/catalog.asp?tags=%E5%9B%A2%E9%98%9F">团队</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/610.html#comment" target="_blank">添加评论</a>(0)</p><p><a href="http://www.xunzou.com/blog/post/610.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>心情日记</category><comments>http://www.xunzou.com/blog/post/610.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=610</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=610&amp;key=159977e9</trackback:ping></item><item><title>CSS3属性选择符及其伪类</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/609.html</link><pubDate>Sat, 13 Mar 2010 15:10:41 +0800</pubDate><guid>http://www.xunzou.com/blog/post/609.html</guid><description><![CDATA[<p>CSS3增加了很多非常有用的选择符及其伪类，利用这些新的技术，可以在我们的日常工作中节省不少的时间，并且减少HTML及CSS文件的大小。</p><p>今天主要介绍一下CSS3新增加的属性选择符和伪类。下表仅是其中的一部分，有些伪类没有在下面表中，如:root等伪类。</p><h3>CSS3选择符语法概览：</h3><div style="margin:10px 0 10px 0;text-align:center;"><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/3/201003131513251157.jpg" alt="" title=""/></div>上表来自于蓝色理想（有修改）：<a href="http://www.blueidea.com/tech/web/2008/5708.asp" target="_blank">http://www.blueidea.com/tech/web/2008/5708.asp</a><br/><h4>1.	字串匹配的属性选择符：</h4><h5>a)	E[att^="val"] 匹配具有att属性、且值以val开头的E元素</h5><p>例如：</p>[CODE=html]<br/><div class="no001">1</div><div class="no002">2</div><div class="yes003">3</div><div class="yes004">4</div><div class="no005">5</div>[/CODE]<br/><p>CSS代码：</p>[CODE=css]div[class^="no"] {background:#F00;}[/CODE]<br/><p>这个代码表示：class属性以”no”开头的div元素背景颜色将会是红色（#F00）;</p><b><a href="http://www.xunzou.com/demo/sxwl/index.html#att1" target="_blank"><font size="4">查看演示</font></a></b><br/><h5>b)	E[att$="val"]匹配具有att属性、且值以val结尾的E元素</h5><p>例如：</p>[CODE=html]<br/><div class="xunzou">1</div><div class="kaizou">2</div><div class="dazou">3</div><div class="yes004">4</div><div class="no005">5</div>[/CODE]<br/><p>CSS代码：</p>[CODE=css]div[class$="zou"] {background:#000;}[/CODE]<br/><p>这个代码表示：class属性以”zou”结尾的div元素背景颜色将会是黑色（#000）;</p><b><a href="http://www.xunzou.com/demo/sxwl/index.html#att2" target="_blank"><font size="4">查看演示</font></a></b><br/><h5>c)	E[att*="val"] 匹配具有att属性、且值中含有val的E元素</h5><p>例如：</p>[CODE=html]<br/><div class="abcde">1</div><div class="abc">2</div><div class="de">3</div><div class="abd">4</div><div class="bce">5</div>[/CODE]<br/><p>CSS代码：</p>[CODE=css]div[class*="ab"] {background:#CCC;}[/CODE]<br/><p>这个代码表示：class属性的值包含有”ab ”的div元素背景颜色将会是灰色（#CCC）;</p><b><a href="http://www.xunzou.com/demo/sxwl/index.html#at3" target="_blank"><font size="4">查看演示</font></a></b><br/><p>我们其实可以用这个属性选择符来做一个这样的事情，比如说你的网站上有外站的连接，比如说友情连接等，你可以用属性选择符来匹配包含http值的元素使其后面增加一个小图标（注意本站的文章中已经有类似的效果）。但是有时候自己的站也会加上绝对地址，这样的话，站内连接也会加上图标了。我们可以再次使用属性选择符来消除上面的本站内的效果。<br/>例如：</p>[code=css]a[href^=”http://”] , a[href^=”https://”] {/*现在一些站也有以https连接的，所以要加上这个。*/<br/>padding:0 15px 0 0;/*右边空出15px来放置小图片*/<br/>background:url(图片地址) no-repeat right top;/*将图片放置与右上角*/<br/>}<br/>a[href*=”xunzou”]{ /*这里以我的网站为例，取消站内连接的小图标*/<br/>	padding:0;/*去掉右边空出的15px*/<br/>	background:none;/*去掉图片*/<br/>}[/code]<br/><p总结：以上三个属性除了IE6不支持外，IE6以上，以及最新的firefox、opera、Safari 和chrome都支持这三个属性选择符。</p><h4>2.	结构性伪类</h4><h5>a)	E:nth-child(n) 匹配父元素中的第n个子元素E</h5><p>这个元素在你做列表或者数据表格的时候将非常有用。例如：E:nth-child(2) 在这里的数字2.将选中第二行。最常见的“隔行换色”就可以用这个伪类轻松的做出。例如：E:nth-child(2n+1){background:#F00};这个是隔行换色。这里的n可以取任何整数值，你也可以给n取和负值。</p><p>这里是一些常用的取值，希望可以帮助大家理解这个属性。</p><div style="margin:10px 0 10px 0;text-align:center;"><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/3/201003131525248327.jpg" alt="" title=""/></div><p>这里有个网址你可以测试它的数值以及产生的效果：</p><a href="http://css-tricks.com/examples/nth-child-tester/" target="_blank">http://css-tricks.com/examples/nth-child-tester/</a><br/><p>关于E:nth-child(n)的一些其他文章：</p><a href="http://css-tricks.com/how-nth-child-works/" target="_blank">http://css-tricks.com/how-nth-child-works/</a><br/><a href="http://devsnippets.com/article/5-advanced-css-pseudo-class.html" target="_blank">http://devsnippets.com/article/5-advanced-css-pseudo-class.html</a><br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc01" target="_blank"><font size="4">查看演示</font></a></b><br/><h5>b)	E:nth-last-child(n) 匹配父元素中的倒数第n个结构子元素E</h5><p>这个匹配的是父元素中倒数第n个子元素。例如：</p>[CODE=css]<br/>#nthlc li:nth-last-child(2) {<br/>	background: #999;/*这里第五个li将会显示背景色为灰色（#999）*/<br/>}<br/>[/CODE]<br/><p>CSS代码：</p>[CODE=html]<ul id=”nthlc”>	<li>第1个li</li><li>第2个li</li>	<li>第3个li</li><li>第4个li</li>	<li>第5个li</li><li>第6个li</li></ul>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc02" target="_blank"><font size="4">查看演示</font></a></b><br/><h5>c)	E:nth-of-type(n) 匹配同类型中的第n个同级兄弟元素E</h5><p>例如：</p>[CODE=css]<br/>#nthot em:nth-of-type (2) {<br/>	background: #999;/*这里第2个em将会显示背景色为灰色（#999）*/<br/>}<br/>[/CODE]<br/><p>html代码：</p>[CODE=html]<div id=”nthot”>	 <p>这里是第1个p</p><p>这里是第2个p</p><em>这里是第1个em</em><br/><em>这里是第2个em</em><br/><p>这里是第3个p</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc03" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><br/><h5>d)	E:nth-last-of-type(n) 匹配同类型中的倒数第n个同级兄弟元素E</h5><p>例如：</p>[CODE=css]<br/>#nthlc em:nth-last-of-type(2) {<br/>	background: #999;/*这里第1个em将会显示背景色为灰色（#999）*/<br/>}<br/>[/CODE]<br/><p>html代码：</p>[CODE=html]<div id=”nthlot”>	 <p>这里是第1个p</p><p>这里是第2个p</p><em>这里是第1个em</em><br/><em>这里是第2个em</em><br/><p>这里是第3个p</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc04" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><br/><h5>e)	E:last-child匹配父元素中最后一个E元素</h5><p>例如：</p>[CODE=css]<br/>#lc p:last-child {<br/>	background: #999;/*这里最后一个p将会显示背景色为灰色（#999）*/<br/>}<br/>[/CODE]<br/><p>html代码：</p>[CODE=html]<div id=”lc”>	 <p>这里是第1个p</p><p>这里是第2个p</p><em>这里是第1个em</em><br/><em>这里是第2个em</em><br/><p>这里是第3个p</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc05" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><br/><h5>f)	E:first-of-type匹配同级兄弟元素中的第一个E元素</h5><p>例如：</p>[CODE=css]<br/>#fot  p:first-of-type{<br/>	background: #999;/*这里第1个p将会显示背景色为灰色（#999）*/<br/>}<br/>[/CODE]<br/><p>html代码：</p>[CODE=html]<div id=”fot”><em>这里是第1个em</em><br/><em>这里是第2个em</em><br/>	<p>这里是第1个p</p><p>这里是第2个p</p><p>这里是第3个p</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc06" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><h5>g)	E:only-child匹配属于父元素中唯一子元素的E</h5><p>例如：</p>[CODE=css]<br/>#oc  p:only-child{<br/>	background: #999;/*这里唯一的1个p将会显示背景色为灰色（#999）*/<br/>}<br/>[/CODE]<br/><p>html代码：</p>[CODE=html]<div>			<em>这是div里的1个em</em><br/>		</div>		<div>			<p>这里div里的第1个p和em不在同一个父元素</p>			<p>这里div里的第2个p</p>		</div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc07" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><h5>h)	E: only-of-type 匹配属于同类型中唯一兄弟元素的E</h5><p>例如：</p>[CODE=css]<br/>#pc08 p:only-of-type {<br/>	background: #999;/*这里唯一的1个p将会显示背景色为灰色（#999）*/<br/>}[/CODE]<br/><p>html代码：</p>[CODE=html]<div class="Pc" id="pc08">		<h3>E:only-of-type</h3>		<em>这里是第1个em</em><br/>		<em>这里是第2个em</em><br/>		<p>这里是唯一的1个p</p>		<em>这里是第3个em</em><br/>		<em>这里是第4个em</em><br/>	</div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc08" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><h5>i)	E:empty匹配没有任何子元素（包括text节点）的原色E</h5><p>例如：</p>[CODE=css]<br/>div em:empty{<br/>	background: #999;/*这里空元素p将会显示背景色为灰色（#999）*/<br/>}[/CODE]<br/><p>html代码：</p>[CODE=html]<div>	<p>这里是第1个p</p>	<p></p><em>上面第二个p背景色为灰色</em><br/></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc09" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><h5>j)	E:target匹配相关URL指向的E元素</h5><p>例如：</p>[CODE=css]<br/>div p:target{<br/>	background: #999;/*这里空原色p将会显示背景色为灰色（#999）*/<br/>}[/CODE]<br/><p>html代码：</p>[CODE=html]<div>	<p><a href=”#pid”这里是第1个a</a></p>	<p>这是第二个p</p>	<p id=”pid”>这是第三个p，有个id是pid，这个会变色</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc10" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><h5>k)	E:not(s) 匹配所有不匹配简单选择符s的元素E</h5><p>例如：</p>[CODE=css]<br/>div p:not(.ab){<br/>	background: #999;/*这里.ab将没有背景色，其它p显示背景色为灰色（#999）*/<br/>}[/CODE]<br/><p>html代码：</p>[CODE=html]<div>	<p class="ab">这里是第1个p</p>	<p class="cd">这里是第2个p</p>	<p>这里是第3个p</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc10" target="_blank"><font size="4">查看演示</font></a></b><br/><br/><h5>l)	E ~ F匹配E元素之后的F元素</h5><p>例如：</p>[CODE=css]<br/>div p:not(.ab){<br/>	background: #999;/*这里.ab将没有背景色，其它p显示背景色为灰色（#999）*/<br/>}[/CODE]<br/><p>html代码：</p>[CODE=html]<div>	<p class="ab">这里是第1个p</p>	<p class="cd">这里是第2个p</p>	<p>这里是第3个p</p></div>[/CODE]<br/><b><a href="http://www.xunzou.com/demo/sxwl/index.html#pc10" target="_blank"><font size="4">查看演示</font></a></b><br/><p>这里基本上罗列的一些css3的属性选择符以及伪类，还有一些没有写上。欢迎大家拍砖。感谢<a href="http://webteam.tencent.com/" target="_blank">腾 讯Webteam </a>开发的<a href="http://webteam.tencent.com/css3/" target="_blank">CSS3手册</a>，以上有一部分内容参考了<a href="http://webteam.tencent.com/css3/" target="_blank">CSS3手册</a>。</p><p><b>浏览器支持：</b>以上12个伪类仅E ~ F 兄弟选择器IE6以上浏览器支持外，其他IE6及其以下浏览器均不支持。但是最新的firefox、opera、Safari 和chrome都支持这些伪类。</p><p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/609.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=%E4%BC%AA%E7%B1%BB">伪类</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=%E5%B1%9E%E6%80%A7%E9%80%89%E6%8B%A9%E7%AC%A6">属性选择符</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/609.html#comment" target="_blank">添加评论</a>(0)</p><h3>相关文章:</h3><ul><li><a  href="http://www.xunzou.com/blog/post/614.html">css3多列布局模块研究</a>&nbsp;&nbsp;(2010-5-31 17:30:20)</li><li><a  href="http://www.xunzou.com/blog/post/612.html">用css3创建的3d效果的“带子”</a>&nbsp;&nbsp;(2010-4-24 12:23:30)</li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/609.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=609</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=609&amp;key=2ecb7be3</trackback:ping></item><item><title>IE的条件语句整理</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/608.html</link><pubDate>Fri, 12 Mar 2010 12:07:13 +0800</pubDate><guid>http://www.xunzou.com/blog/post/608.html</guid><description><![CDATA[<p>众所周知，IE6自出生以来，为人们付出了汗马功劳。但是，现在看来，它已经非常的老态龙钟了。它的儿子（IE7）和孙子（IE8）都已经出来，并且占有了一定的市场了。虽然它的接班人相比它来说对web标准的支持已经有了很大的进步，但是和其他的浏览器（Firefox、opera、Google chrome、Apple safari等）对比的话，IE还是有一些差距的。</p><p>因此，平时在工作中，我们总是为IE6或者IE浏览器写一些兼容性的样式。比如属性前的下划线“_”、比如“*html #nav{/*想要IE6展示的样式*/}”等等。这样的写法让IE和其他的浏览器有了相同的表现，但是我们的代码却不是那么好看了。为了保持我们CSS代码的清晰明了，我们也可以使用IE专有的条件语句。</p><h4>下面是IE的条件语句参考：</h4><h5>针对所有版本的IE浏览器：</h5>[CODE=html]<br/><!--[if IE]><br/>	这里是要在IE里显示的一些样式等<br/><![endif]--><br/>[/CODE]<br/><h5>针对所有非IE的浏览器：</h5>[CODE=html]<br/><!--[if !IE]><br/>	这里是在非IE里显示的一些样式等<br/><![endif]--><br/>[/CODE]<br/><h5>针对所有非IE的浏览器：</h5>[CODE=html]<br/><!--[if !IE]><br/>	这里是在非IE里显示的一些样式等<br/><![endif]--><br/>[/CODE]<br/><br/><br/><h5>针对IE7：</h5>[CODE=html]<br/><!--[if IE 7]><br/>	IE7<br/><![endif]--><br/>[/CODE]<br/><h5>针对IE6</h5>[CODE=html]<br/><!--[if IE 6]><br/>	IE6<br/><![endif]--><br/>[/CODE]<br/><h5>针对IE5</h5>[CODE=html]<!--[if IE 5]><br/>	IE5<br/><![endif]--><br/>[/CODE]<br/><h5>针对IE5.5</h5>[CODE=html]<br/><!--[if IE 5.5000]><br/>	IE5<br/><![endif]-->[/CODE]<br/><h5>针对IE6和IE6以前版本：</h5>[CODE=html]<!--[if lt IE 7]><br/>	IE6和以前版本<br/><![endif]--> [/CODE]<br/>或者：[CODE=html]<br/><!--[if lte IE 6]><br/>	IE6和以前版本<br/><![endif]--> [/CODE]<br/><br/><h5>IE7和以前版本：</h5>[CODE=html]<!--[if lt IE 8]><br/>	IE7和以前版本<br/><![endif]--> [/CODE]<br/><br/>或者：<br/>[CODE=html]<!--[if lte IE 7]><br/>	IE7和以前版本<br/><![endif]-->[/CODE]<br/><br/><h5>IE8和以前版本：</h5>[CODE=html]<!--[if lt IE 9]><br/>	IE7和以前版本<br/><![endif]--> [/CODE]<br/><br/>或者：<br/>[CODE=html]<!--[if lte IE 8]><br/>	IE7和以前版本<br/><![endif]--> [/CODE]<br/><br/><br/><h5>针对IE6和IE6以后的版本</h5>[CODE=html]<!--[if gt IE 5.5]><br/>	IE6和IE6以后的版本<br/><![endif]--> [/CODE]<br/>或者：<br/>[CODE=html]<!--[if gte IE 6]><br/>	IE6和IE6以后的版本<br/><![endif]--> [/CODE]<br/><br/><h5>针对IE7和IE7以后的版本</h5>[CODE=html]<!--[if gt IE 6]><br/>	IE7和IE7以后的版本<br/><![endif]--> [/CODE]<br/>或者：<br/>[CODE=html]<!--[if gte IE 7]><br/>	IE7和IE7以后的版本<br/><![endif]--> [/CODE]<br/><br/><br/><h5>针对IE8和IE8以后的版本</h5><br/>[CODE=html]<!--[if gt IE 7]><br/>	IE8和IE8以后的版本<br/><![endif]--> [/CODE]<br/>或者：<br/>[CODE=html]<!--[if gte IE 8]><br/>	IE8和IE8以后的版本<br/><![endif]--> [/CODE]<br/>在css-tricks上看到的一些信息，保存下来自己以后可以用。<br/>另外也可以看之前的两篇文章：<br/> [<a target="_blank"  href="http://www.xunzou.com/blog/post/593.html">IE的条件语句</a>] <br/>[<a target="_blank"  href="http://www.xunzou.com/blog/post/530.html">条件CSS的使用</a>] <br/>本文地址：<a href="http://www.xunzou.com/blog/post/608.html" target="_blank">http://www.xunzou.com/blog/post/608.html</a><br/>原文地址：<a href="http://css-tricks.com/how-to-create-an-ie-only-stylesheet/" target="_blank">http://css-tricks.com/how-to-create-an-ie-only-stylesheet/</a> <p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/608.html" target="_blank">继续阅读《IE的条件语句整理》的全文内容...</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=IE">IE</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=%E6%9D%A1%E4%BB%B6%E8%AF%AD%E5%8F%A5">条件语句</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/608.html#comment" target="_blank">添加评论</a>(0)</p><p><a href="http://www.xunzou.com/blog/post/608.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/608.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=608</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=608&amp;key=d60e6af8</trackback:ping></item><item><title>视频播放缩略图增加播放按钮</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/607.html</link><pubDate>Mon, 08 Mar 2010 18:05:27 +0800</pubDate><guid>http://www.xunzou.com/blog/post/607.html</guid><description><![CDATA[<p>在<a href="http://www.hulu.com/" target="_blank">hulu</a>（美国知名的视频网站）上看到了这个视频缩略图增加一个play的效果，突然心血来潮，就也想做一个这样的效果。</p><p><strong>思路：</strong>利用a标签，里面包含一个视频缩略图片，鼠标放上去之后，增加边框，图片上增加一个播放按钮，播放按钮用背景图来展示。<br />a标签里需要放置一个em,默认的时候隐藏，hover的时候em显示出来。</p><p>查看演示：<a href="http://www.xunzou.com/demo/thumbnail/" target="_blank">http://www.xunzou.com/demo/thumbnail/</a><br />下图左边为默认显示效果，右边为鼠标放上去的效果。<br />&nbsp;</p><div style="margin:10px 0 10px 0;text-align:center;"><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/3/201003081753137300.jpg" alt="" title=""/></div>[CODE=css]<br/>.vp {width:600px;margin:0 auto;}<br/>.vp a {width:145px;height:80px;display:block;background:#FFF;padding:4px;border:1px solid #333;overflow:hidden;position:relative;float:left;margin:30px 45px 0 0;}<br/>.vp a img {width:145px;height:80px;}<br/>.vp a em {display:none;width:33px;height:32px;background:url(btn-play-big.png) no-repeat;overflow:hidden;text-indent:-999px;}<br/>.vp a:hover {padding:3px;border-width:2px;}<br/>.vp a:hover em {display:block;position:absolute;top:29px;left:61px;z-index:2;cursor:pointer;}<br/>[/CODE]<br/>[CODE=html]<br/><div class="vp">    <a href="#"><br/>	<img src="001.jpg" alt="视频名称" /><br/>	<em>点此播放</em><br/>    </a><br/></div>[/CODE]<br/><b>浏览器支持：</b><br/>IE6及其以上、Firefox、safari、opera、chrome等<p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/607.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=CSS">CSS</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=hover">hover</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=thumbnail">thumbnail</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/607.html#comment" target="_blank">添加评论</a>(0)</p><h3>相关文章:</h3><ul><li><a  href="http://www.xunzou.com/blog/post/615.html">Css content属性详解</a>&nbsp;&nbsp;(2010-7-6 18:54:17)</li><li><a  href="http://www.xunzou.com/blog/post/605.html">css属性之clip</a>&nbsp;&nbsp;(2010-2-25 15:46:54)</li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/607.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=607</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=607&amp;key=059e72ca</trackback:ping></item><item><title>[整理]日常所用的Firefox扩展</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/606.html</link><pubDate>Thu, 04 Mar 2010 18:26:31 +0800</pubDate><guid>http://www.xunzou.com/blog/post/606.html</guid><description><![CDATA[<p>　　Firefox是据称最好的浏览器，哈哈。好不好我今天不做评判，但是就它对web标准的支持来说，是比较不错的（当然Opera、Google的Chrome和Apple的Safari也不错）。他们都比IE在这方面好的多。<br />对于web前端开发工程来说，Firefox是一个不错的浏览器。我这一年已经放弃了IE，基本都用它，IE只在开发的时候用来测试，毕竟IE的市场份额是比较大的。　<br />Firefox浏览器的扩展给大家在日常的网站开发和浏览中提供了很大的帮助，今天整理了一下我经常用到的一些Firefox浏览器的扩展。</p><p><strong>1、 Firebug</strong></p><p>&nbsp;&nbsp;&nbsp; 相信做web开发的人对这个插件都不会陌生。（什么？你不知道这个插件？你OUT了吧。）<br />&nbsp;&nbsp;&nbsp; Firebug 为你的 Firefox 集成了浏览网页的同时随手可得的丰富开发工具。你可以对任何网页的 CSS、HTML 和 JavaScript 进行实时编辑、调试和监控&hellip;<br />&nbsp;&nbsp;&nbsp; Firebug在Firefox的下载地址：<a target="_blank" href="https://addons.mozilla.org/zh-CN/firefox/addon/1843">https://addons.mozilla.org/zh-CN/firefox/addon/1843</a><br />&nbsp;&nbsp;&nbsp; Firebug官方地址：<a href="http://getfirebug.com/" target="_blank">http://getfirebug.com/</a><br />&nbsp;</p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/3/001.jpg" onload="ResizeImage(this,520)" /></p><p style="text-align: left;"><strong>2、&nbsp;&nbsp;&nbsp; Web Developer&nbsp; </strong><br />它在Firefox工具栏提供了一个菜单，有各种各样的工具可供选择使用。<br />Web Developer在Firefox的下载地址：<a href="https://addons.mozilla.org/zh-CN/firefox/addon/60" target="_blank">https://addons.mozilla.org/zh-CN/firefox/addon/60</a></p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/3/201003041837516880.jpg" onload="ResizeImage(this,520)" /></p><p>&nbsp;</p><p><strong>3、Yslow </strong><br />Yslow是yahoo公司开发的一个对web页面进行分析并提出合理化建议的检测工具。Yslow是基于firebug的工具，所以想要装这个，需要先装上firebug。<br />yslow在Firefox的下载地址：<a href="https://addons.mozilla.org/zh-CN/firefox/addon/5369" target="_blank">https://addons.mozilla.org/zh-CN/firefox/addon/5369</a><br />Yahoo官方地址：<a href="http://developer.yahoo.com/yslow/" target="_blank">http://developer.yahoo.com/yslow/</a></p><p>&nbsp;</p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/3/201003041843036180.jpg" onload="ResizeImage(this,520)" /></p><p><br />4、HTML Validator <br />HTML Validator是一个监测页面html代码错误的工具，包括错误的嵌套、错误的标签等。<br />HTML Validator在Firefox的下载地址：<a href="https://addons.mozilla.org/zh-CN/firefox/addon/249" target="_blank">https://addons.mozilla.org/zh-CN/firefox/addon/249</a></p><p>&nbsp;</p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/3/201003041844007258.jpg" onload="ResizeImage(this,520)" /></p><p><br />5、Delicious Bookmarks&nbsp; <br />Delicious是yahoo的一个在线存储书签的网站，它能够方便的把你的书签上传到Delicious网站上。你能够在任何地方打开你的书签。<br />Delicious Bookmarks 是yahoo针对Delicious网站开发的基于Firefox的扩展，更加方便的携带你的书签。<br />Delicious  Bookmarks在Firefox的下载地址：<a href="https://addons.mozilla.org/zh-CN/firefox/addon /3615" target="_blank">https://addons.mozilla.org/zh-CN/firefox/addon /3615</a><br /><a href="http://delicious.com/" target="_blank">http://delicious.com/</a> (yahoo账户可直接登录)<br /><br />6、Echofon <br />Echofon是一个可以发布twitter、查看tweets的一个插件；<br />Echofon在Firefox的下载地址：<a href="https://addons.mozilla.org/zh-CN/firefox/addon/5081" target="_blank">https://addons.mozilla.org/zh-CN/firefox/addon/5081</a></p><p>&nbsp;</p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/3/201003041844262763.jpg" onload="ResizeImage(this,520)" /></p><p>&nbsp;</p><p>&nbsp;<br /><br />7、View Source Chart <br />View Source Chart  看名字大家应该都知道了，这个是查看源代码的。它查看的源代码是以布局/图形的方式把源代码显示出来的。也可以说是查看dom的工具吧！<br />View Source  Chart在Firefox的下载地址：<a href="https://addons.mozilla.org/en-US/firefox/addon/655 " target="_blank">https://addons.mozilla.org/en-US/firefox/addon/655 </a></p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/3/201003041844560050.jpg" onload="ResizeImage(this,520)" /></p><p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/606.html" target="_blank">继续阅读《[整理]日常所用的Firefox扩展》的全文内容...</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=firefox">firefox</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=firebug">firebug</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=yslow">yslow</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=Web+Developer">Web Developer</a>&nbsp;&nbsp;<a href="http://www.xunzou.com/blog/catalog.asp?tags=html">html</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/606.html#comment" target="_blank">添加评论</a>(1)</p><p><a href="http://www.xunzou.com/blog/post/606.html#comment" target="_blank">还没有相关文章，您来说两句？</a></p>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/606.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=606</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=606&amp;key=bb291ffd</trackback:ping></item><item><title>css属性之clip</title><author>xunzou@gmail.com (冰剑)</author><link>http://www.xunzou.com/blog/post/605.html</link><pubDate>Thu, 25 Feb 2010 15:46:54 +0800</pubDate><guid>http://www.xunzou.com/blog/post/605.html</guid><description><![CDATA[<p>今天说一下CSS的clip属性，这个属性可能不经常用，但是也是比较有用的属性之一。<br />我们先来看一下它的语法：</p><blockquote><p>&nbsp;语法：clip : auto | rect ( number number number number )</p><p>取值： auto:  默认值。对象无剪切； rect ( number number number number  )：依据上-右-下-左的顺序提供自对象左上角为(0,0)坐标计算的四个偏移数值，其中任一数值都可用 auto 替换，即此边不剪切</p></blockquote><p>&nbsp;以上引用自苏昱的：<em>样式表中文手册</em>。</p><p>clip它相当于一个遮罩，允许你遮住一个矩形元素的一部分。你必须为元素定义绝对定：absolute属性。制定一个相对于元素的top、right、bottom和left值。但是这4个值并不是和我们常用的border、margin、padding等的4个值的取值方法一样。具体看下图：</p><p style="text-align: center;"><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/2/clip-01.jpg" alt="" title="" /></p><p style="text-align: left;">这里要注意的是right的值是从最左边开始算起的，bottom值是从最上面开始算起的。</p><p style="text-align: left;"><strong>下面我们来看两个例子：</strong></p><p style="text-align: left;">1、图像裁剪的例子（<a href="http://www.xunzou.com/demo/clip/clip.html" target="_blank"><strong>点这里查看演示</strong></a>）：</p><p style="text-align: left;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用clip属性给图片一个遮罩，首先指定一个div元素position属性为：relative；然后在里面的img的css图像设置为：position:absolute;clip:rect(30px 165px 100px 30px);</p><p style="text-align: center;"><img title="" alt="" src="http://www.xunzou.com/blog/upload/2010/2/clip-02.jpg" onload="ResizeImage(this,520)" /></p><p>用到的css如下：</p>[CODE=css]<br/>.clip {<br/>    position: relative;<br/>    height: 130px;<br/>    width: 200px;<br/>    border: solid 1px #000;<br/>    margin:40px 0;<br/>}<br/>.clip img {<br/>    position: absolute;<br/>    clip: rect(30px 165px 100px 30px);<br/>}<br/>[/CODE]<br/><p>2、调整图像大小的例子（<a href="http://www.xunzou.com/demo/clip/clip.html" target="_blank"><strong>点这里查看演示</strong></a>）：</p><p>原始图像为高200px，宽140px的图像，我现在要做一个它的缩略图，等比的话宽是100px，高为70px。但是既然是缩略图，我们可以设置为相等宽高的。这时我们可以用clip来裁剪图片多出的部分。</p><p>clip: rect(0 85px 70px 15px);详细解释：<br />总共宽度为100px，减去30px，则两边一边减去15px；<br />top=0，图像本来高度就是70，所以不用裁剪，top为0；<br />right=85，左边的15加上图像宽度70，即为这个值；<br />bottom=70，也不用裁剪，但是需从最上面取值；<br />left=15；<br />由于图片右边的15px已经裁剪掉，左边还有15px的空间，所有需要在图片上再添加left:-15px;去&ldquo;取消&rdquo;这个因裁剪留下的空白。</p><p style="text-align: center;"><img onload="ResizeImage(this,520)" src="http://www.xunzou.com/blog/upload/2010/2/clip-03.jpg" alt="" title="" /></p><p style="text-align: left;">用到的css如下：</p>[CODE=css]<br/>.gallery {<br/>    list-style: none;<br/>    margin: 0;<br/>    padding: 0;<br/>}<br/>.gallery li {<br/>    float: left;<br/>    margin: 0 10px 0 0;<br/>    position: relative;<br/>    width: 70px;<br/>    height: 70px;<br/>    border: solid 1px #000;<br/>}<br/>.gallery img {<br/>    width: 100px;<br/>    height: 70px;<br/>    position: absolute;<br/>    clip: rect(0 85px 70px 15px);<br/>    left: -15px;<br/>}[/CODE]<br/><br/><p>这篇文章是我根据<a target="_blank" href="http://www.webdesignerwall.com/">webdesignerwall</a>网站上的一片文章，将其一部分翻译过来了。其实也不算是翻译，只是按照自己的理解给重新说明了一下。</p><p>本文地址：<a target="_blank" href="http://www.xunzou.com/blog/post/605.html">http://www.xunzou.com/blog/post/605.html</a></p><p>原文地址：<a target="_blank" href="http://www.webdesignerwall.com/tutorials/5-simple-but-useful-css-properties/">http://www.webdesignerwall.com/tutorials/5-simple-but-useful-css-properties/</a></p><p>&nbsp;</p><p>Copyright © 2010 xunzou.com</p><p><a href="http://www.xunzou.com/blog/post/605.html" target="_blank">继续阅读《css属性之clip》的全文内容...</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=clip">clip</a>&nbsp;&nbsp; | <a href="http://www.xunzou.com/blog/post/605.html#comment" target="_blank">添加评论</a>(0)</p><h3>相关文章:</h3><ul><li><a  href="http://www.xunzou.com/blog/post/615.html">Css content属性详解</a>&nbsp;&nbsp;(2010-7-6 18:54:17)</li><li><a  href="http://www.xunzou.com/blog/post/607.html">视频播放缩略图增加播放按钮</a>&nbsp;&nbsp;(2010-3-8 18:5:27)</li></ul>]]></description><category>前端技术</category><comments>http://www.xunzou.com/blog/post/605.html#comment</comments><wfw:comment>http://www.xunzou.com/blog/</wfw:comment><wfw:commentRss>http://www.xunzou.com/blog/feed.asp?cmt=605</wfw:commentRss><trackback:ping>http://www.xunzou.com/blog/cmd.asp?act=tb&amp;id=605&amp;key=0455f515</trackback:ping></item></channel></rss>
