<?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>爱周末 &#187; css</title>
	<atom:link href="http://zhoumo123.cn/category/web/css/feed" rel="self" type="application/rss+xml" />
	<link>http://zhoumo123.cn</link>
	<description>知识分享，共同进步。zhoumo123.cn</description>
	<lastBuildDate>Thu, 07 Nov 2019 05:53:49 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.1</generator>
	<item>
		<title>-webkit- -moz-浏览器私有属性前缀</title>
		<link>http://zhoumo123.cn/web/css/3460.html</link>
		<comments>http://zhoumo123.cn/web/css/3460.html#comments</comments>
		<pubDate>Mon, 04 Jan 2016 02:04:45 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[浏览器私有前缀]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3460</guid>
		<description><![CDATA[CSS3的浏览器私有属性前缀是一个浏览器生产商经常使用的一种方式。它暗示该CSS属性或规则尚未成为W3C标准的一部分。 以下是几种常用前缀 -webkit- -moz- -ms- -o- -khtml-（现在基本都没有用了，被-webkit-取代） 举例来说，一个CSS3圆角的代码是： -webkit-border-radius: 50%; -o-border-radius: 50%; -moz-border-radius: 50%; -ms-border-radius: 50%; CSS3前缀+标准代码的顺序 既然CSS3代码中（暂时）需要写上这么多前缀，那么他们的顺序是如何的呢？ 结论:是 ...  <a href="http://zhoumo123.cn/web/css/3460.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>CSS3的浏览器私有属性前缀是一个浏览器生产商经常使用的一种方式。它暗示该CSS属性或规则尚未成为W3C标准的一部分。</p>
<p>以下是几种常用前缀</p>
<p>-webkit-<br />
-moz-<br />
-ms-<br />
-o-<br />
-khtml-（现在基本都没有用了，被-webkit-取代）<br />
举例来说，一个CSS3圆角的代码是：</p>
<p>-webkit-border-radius: 50%;<br />
-o-border-radius: 50%;<br />
-moz-border-radius: 50%;<br />
-ms-border-radius: 50%;<br />
<strong>CSS3前缀+标准代码的顺序</strong></p>
<p>既然CSS3代码中（暂时）需要写上这么多前缀，那么他们的顺序是如何的呢？</p>
<p>结论:是先写私有的CSS3属性，再写标准的CSS3属性。</p>
<p><span style="color: #333399;">-webkit-transform:rotate(-3deg); /*为Chrome/Safari*/</span><br />
<span style="color: #333399;">-moz-transform:rotate(-3deg); /*为Firefox*/</span><br />
<span style="color: #333399;">-ms-transform:rotate(-3deg); /*为IE*/</span><br />
<span style="color: #333399;">-o-transform:rotate(-3deg); /*为Opera*/</span><br />
<span style="color: #333399;">transform:rotate(-3deg); /*为nothing*/</span></p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3460.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery获取div元素属性内容attr的用法</title>
		<link>http://zhoumo123.cn/web/jquery/3448.html</link>
		<comments>http://zhoumo123.cn/web/jquery/3448.html#comments</comments>
		<pubDate>Thu, 24 Dec 2015 01:36:01 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3448</guid>
		<description><![CDATA[jQuery如何获取元素的属性值的内容呢，一起看下例子： 下面的例子获取div中 style 属性的内容。 &#160;]]></description>
				<content:encoded><![CDATA[<p>jQuery如何获取元素的属性值的内容呢，一起看下例子：</p>
<p>下面的例子获取div中 style 属性的内容。</p>
<pre class="brush: php; title: ; notranslate">

&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){ 
    $(&quot;.show&quot;).each(function(i){
        var v = $(this).attr(&quot;style&quot;);
        alert(v);
    });
});
&lt;/script&gt;
&lt;div class=&quot;show&quot; style=&quot; font-size:14px; color:#03C;&quot;&gt;test1&lt;/div&gt;
&lt;div class=&quot;show&quot; style=&quot; font-size:16px; color:#009;&quot;&gt;test2&lt;/div&gt;
&lt;div class=&quot;show&quot; style=&quot; font-size:18px; color:#000;&quot;&gt;test3&lt;/div&gt;



</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/jquery/3448.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css中rem与px，pt转换</title>
		<link>http://zhoumo123.cn/web/css/3410.html</link>
		<comments>http://zhoumo123.cn/web/css/3410.html#comments</comments>
		<pubDate>Thu, 03 Dec 2015 14:45:45 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3410</guid>
		<description><![CDATA[rem是css3中新增加的一个单位值，他和em单位一样，都是一个相对单位。不同的是em是相对于元素的父元素的font-size进行计算；rem是相对于根元素html的font-size进行计算。这样一来rem就绕开了复杂的层级关系，实现了类似于em单位的功能。 例如：当前根元素html的font-size为100%，那么根据下边的参照表可以看出，其px值为16，那么我们如果要转换一个块元素的px为rem，就可以有以下写法 注：1000为需要转换元素块的宽度 1000除以16值为62.5rem &#160; &#160; http://blog.csdn.net/xudanna/article/ ...  <a href="http://zhoumo123.cn/web/css/3410.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>rem是css3中新增加的一个单位值，他和em单位一样，都是一个相对单位。不同的是em是相对于元素的父元素的font-size进行计算；rem是相对于根元素html的font-size进行计算。这样一来rem就绕开了复杂的层级关系，实现了类似于em单位的功能。</p>
<p>例如：当前根元素html的font-size为100%，那么根据下边的参照表可以看出，其px值为16，那么我们如果要转换一个块元素的px为rem，就可以有以下写法</p>
<p>注：1000为需要转换元素块的宽度</p>
<p>1000除以16值为62.5rem</p>
<p>&nbsp;</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2015/12/rem-px.jpg"><img class="alignnone wp-image-3411 size-full" title="css中rem与px，pt转换" src="http://zhoumo123.cn/wp-content/uploads/2015/12/rem-px.jpg" alt="css中rem与px，pt转换" width="309" height="488" /></a></p>
<p>&nbsp;</p>
<p>http://blog.csdn.net/xudanna/article/details/16946293</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3410.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css 控制文本强制换行word-wrap强制换行</title>
		<link>http://zhoumo123.cn/web/css/3338.html</link>
		<comments>http://zhoumo123.cn/web/css/3338.html#comments</comments>
		<pubDate>Mon, 28 Sep 2015 11:45:19 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[word-wrap]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3338</guid>
		<description><![CDATA[css word-wrap强制文本换行方法， 使用word-wrap属性。在默认情况下，如果文本的内容超过某个div块的宽度的话，就会发生自动换行，因为div块的white-space属性的默认值是normal。但是也有两种情况： 1、如果div块里是一串的文字内容，那么到了div块的width限制时，会自动换行。 2、如果div块里一串没有空格的字母或者数字的时候是那就不换行了，而是直接溢出div块。这时就要考虑css文字强制换行了。 那CSS样式怎么控制文字的强制换行？ 这时候我们需要用到word-wrap属性，还有一个属性word-break也能够解决换行问题，但是它的浏览器兼容性不好， ...  <a href="http://zhoumo123.cn/web/css/3338.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>css word-wrap强制文本换行方法， 使用word-wrap属性。在默认情况下，如果文本的内容超过某个div块的宽度的话，就会发生自动换行，因为div块的white-space属性的默认值是normal。但是也有两种情况：<br />
1、如果div块里是一串的文字内容，那么到了div块的width限制时，会自动换行。<br />
2、如果div块里一串没有空格的字母或者数字的时候是那就不换行了，而是直接溢出div块。这时就要考虑css文字强制换行了。<br />
那CSS样式怎么控制文字的强制换行？<br />
这时候我们需要用到word-wrap属性，还有一个属性word-break也能够解决换行问题，但是它的浏览器兼容性不好，并且还有可能导致其他问题，所以这里不建议使用。<br />
word-wrap的break-word属性值可以导致换行，一般说来如果一个单词比较长的话，行末的空间不足以容纳这个单词就会产生换行，而不是将一个单词截断，word-break的break-all属性值可以截断一个单词。例如:<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
.first<br />
{<br />
width:120px;<br />
height:60px;<br />
border:1px solid blue;<br />
word-wrap:break-word<br />
}<br />
.second<br />
{<br />
width:120px;<br />
height:60px;<br />
border:1px solid red;<br />
word-break:break-all;<br />
}<br />
&lt;/style&gt;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3338.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css命名规范汇总css规范</title>
		<link>http://zhoumo123.cn/web/css/3314.html</link>
		<comments>http://zhoumo123.cn/web/css/3314.html#comments</comments>
		<pubDate>Fri, 18 Sep 2015 06:26:04 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[css编码规范]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3314</guid>
		<description><![CDATA[命名规范 使用有意义的或通用的ID和class命名：ID和class的命名应反映该元素的功能或使用通用名称，而不要用抽象的晦涩的命名。反映元素的使用目的是首选；使用通用名称代表该元素不表特定意义，与其同级元素无异，通常是用于辅助命名；使用功能性或通用的名称可以更适用于文档或模版变化的情况。 /* 不推荐: 无意义 */ #yee-1901 {} /* 不推荐: 与样式相关 */ .button-green {}.clear {} /* 推荐: 特殊性 */ #gallery {}#login {}.video {} /* 推荐: 通用性 */ .aux {}.alt {} 常用命名（多记多查英 ...  <a href="http://zhoumo123.cn/web/css/3314.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>命名规范</p>
<p>使用有意义的或通用的ID和class命名：ID和class的命名应反映该元素的功能或使用通用名称，而不要用抽象的晦涩的命名。反映元素的使用目的是首选；使用通用名称代表该元素不表特定意义，与其同级元素无异，通常是用于辅助命名；使用功能性或通用的名称可以更适用于文档或模版变化的情况。</p>
<p>/* 不推荐: 无意义 */ #yee-1901 {}<br />
/* 不推荐: 与样式相关 */ .button-green {}.clear {}<br />
/* 推荐: 特殊性 */ #gallery {}#login {}.video {}<br />
/* 推荐: 通用性 */ .aux {}.alt {}</p>
<p>常用命名（多记多查英文单词）：page、wrap、layout、header(head)、footer(foot、ft)、content(cont)、menu、nav、main、submain、sidebar(side)、logo、banner、title(tit)、popo(pop)、icon、note、btn、txt、iblock、window(win)、tips等。</p>
<p>ID和class命名越简短越好，只要足够表达涵义。这样既有助于理解，也能提高代码效率。</p>
<p>/* 不推荐 */ #navigation {}.atr {}<br />
/* 推荐 */ #nav {}.author {}<br />
类型选择器避免同时使用标签、ID和class作为定位一个元素选择器；从性能上考虑也应尽量减少选择器的层级。</p>
<p>/* 不推荐 */ul#example {}div.error {}<br />
/* 推荐 */#example {}.error {}</p>
<p>命名时需要注意的点：</p>
<p>规则命名中，一律采用小写加中划线的方式，不允许使用大写字母或 _<br />
命名避免使用中文拼音，应该采用更简明有语义的英文单词进行组合<br />
命名注意缩写，但是不能盲目缩写，具体请参见常用的CSS命名规则<br />
不允许通过1、2、3等序号进行命名<br />
避免class与id重名<br />
id用于标识模块或页面的某一个父容器区域，名称必须唯一，不要随意新建id<br />
class用于标识某一个类型的对象，命名必须言简意赅。<br />
尽可能提高代码模块的复用，样式尽量用组合的方式<br />
规则名称中不应该包含颜色（red/blue）、定位（left/right）等与具体显示效果相关的信息。应该用意义命名，而不是样式显示结果命名。</p>
<p><strong>1、常用id的命名：</strong></p>
<p><strong><em>(1) 页面结构</em></strong></p>
<p>容器: container<br />
页头：header<br />
内容：content/container<br />
页面主体：main<br />
页尾：footer<br />
导航：nav<br />
侧栏：sidebar<br />
栏目：column<br />
页面外围控制整体布局宽度：wrapper<br />
左右中：left right center</p>
<p><em><strong>(2) 导航</strong></em></p>
<p>导航：nav<br />
主导航：mainbav<br />
子导航：subnav<br />
顶导航：topnav<br />
边导航：sidebar<br />
左导航：leftsidebar<br />
右导航：rightsidebar<br />
菜单：menu<br />
子菜单：submenu<br />
标题: title<br />
摘要: summary</p>
<p><em><strong>(3) 功能</strong></em></p>
<p>标志：logo<br />
广告：banner<br />
登陆：login<br />
登录条：loginbar<br />
注册：regsiter<br />
搜索：search<br />
功能区：shop<br />
标题：title<br />
加入：joinus<br />
状态：status<br />
按钮：btn<br />
滚动：scroll<br />
标签页：tab<br />
文章列表：list<br />
提示信息：msg<br />
当前的: current<br />
小技巧：tips<br />
图标: icon<br />
注释：note<br />
指南：guild<br />
服务：service<br />
热点：hot<br />
新闻：news<br />
下载：download<br />
投票：vote<br />
合作伙伴：partner<br />
友情链接：link<br />
版权：copyright</p>
<p><strong>2、常用class的命名：</strong></p>
<p><strong><em>(1) 颜色:使用颜色的名称或者16进制代码，如</em></strong></p>
<p>.red { color: red; }<br />
.f60 { color: #f60; }<br />
.ff8600 { color: #ff8600; }</p>
<p><strong><em>(2) 字体大小,直接使用”font+字体大小”作为名称，如</em></strong></p>
<p>.font12px { font-size: 12px; }<br />
.font9pt {font-size: 9pt; }</p>
<p><em><strong>(3) 对齐样式,使用对齐目标的英文名称，如</strong></em></p>
<p>.left { float:left; }<br />
.bottom { float:bottom; }</p>
<p><em><strong>(4) 标题栏样式,使用”类别+功能”的方式命名，如</strong></em></p>
<p>.barnews { }<br />
.barproduct { }</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3314.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Hack的使用编码规范</title>
		<link>http://zhoumo123.cn/web/css/3311.html</link>
		<comments>http://zhoumo123.cn/web/css/3311.html#comments</comments>
		<pubDate>Fri, 18 Sep 2015 06:21:57 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[css编码规范]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3311</guid>
		<description><![CDATA[请不用动不动就使用浏览器检测和CSS Hacks，先试试别的解决方法吧！考虑到代码高效率和易管理，虽然这两种方法能快速解决浏览器解析差异，但应被视为最后的手段。在长期的项目中，允许使用hack只会带来更多的hack，你越是使用它，你越是会依赖它！ 推荐使用下面的： &#160; &#160;]]></description>
				<content:encoded><![CDATA[<p>请不用动不动就使用浏览器检测和CSS Hacks，先试试别的解决方法吧！考虑到代码高效率和易管理，虽然这两种方法能快速解决浏览器解析差异，但应被视为最后的手段。在长期的项目中，允许使用hack只会带来更多的hack，你越是使用它，你越是会依赖它！</p>
<p>推荐使用下面的：</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2015/09/css-hack1.jpg"><img class="alignnone size-full wp-image-3312" src="http://zhoumo123.cn/wp-content/uploads/2015/09/css-hack1.jpg" alt="css-hack1" width="637" height="563" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3311.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css文本超出显示省略号text-overflow语法</title>
		<link>http://zhoumo123.cn/web/css/3252.html</link>
		<comments>http://zhoumo123.cn/web/css/3252.html#comments</comments>
		<pubDate>Tue, 01 Sep 2015 01:53:35 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3252</guid>
		<description><![CDATA[CSS如何使超出文本显示省略号呢，看下csstext-overflow的用法： 语法： text-overflow ： clip &#124; ellipsis 取值： clip： 不显示省略标记（&#8230;），而是简单的裁切。 ellipsis： 当对象内文本溢出时显示省略标记（&#8230;） 说明： 设置或检索是否使用一个省略标记（&#8230;）标示对象内文本的溢出。对应的脚本特性为textOverflow。 text-overflow属性仅是注解，当文本溢出时是否显示省略标记。并不具备其它的样式属性定义。要实现溢出时产生省略号的效果还须定义：强制文本在一行内显示（white-space:n ...  <a href="http://zhoumo123.cn/web/css/3252.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>CSS如何使超出文本显示省略号呢，看下csstext-overflow的用法：</p>
<p><strong>语法：</strong><br />
text-overflow ： clip | ellipsis</p>
<p><strong>取值：</strong><br />
clip：<br />
不显示省略标记（&#8230;），而是简单的裁切。<br />
ellipsis：<br />
当对象内文本溢出时显示省略标记（&#8230;）</p>
<p><strong>说明：</strong><br />
设置或检索是否使用一个省略标记（&#8230;）标示对象内文本的溢出。对应的脚本特性为textOverflow。<br />
text-overflow属性仅是注解，当文本溢出时是否显示省略标记。并不具备其它的样式属性定义。要实现溢出时产生省略号的效果还须定义：强制文本在一行内显示（white-space:nowrap）及溢出内容为隐藏（overflow:hidden），只有这样才能实现溢出文本显示省略号的效果。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3252.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css hack 各大浏览器 CSS Hack 收集</title>
		<link>http://zhoumo123.cn/web/css/2900.html</link>
		<comments>http://zhoumo123.cn/web/css/2900.html#comments</comments>
		<pubDate>Sun, 14 Jun 2015 11:26:34 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[css hack]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=2900</guid>
		<description><![CDATA[所谓的Hack就是只有特定浏览器才能识别这段hack代码。Hack 不是什么好东西，除非没有办法，我们尽量还是不要用着玩意。 下面是各个浏览器的CSS Hack 列表。 Firefox 浏览器 @-moz-document url-prefix() { .selector { property: value; } } 支持所有Gecko内核的浏览器 (包括Firefox) *&#62;.selector { property: value; } Webkit 内核浏览器 @media screen and (-webkit-min-device-pixel-ratio: 0) { Selecto ...  <a href="http://zhoumo123.cn/web/css/2900.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>所谓的Hack就是只有特定浏览器才能识别这段hack代码。Hack 不是什么好东西，除非没有办法，我们尽量还是不要用着玩意。 下面是各个浏览器的CSS Hack 列表。</p>
<p><a href="http://zhoumo123.cn/wp-content/uploads/2015/06/css-hack.jpg"><img class="alignnone wp-image-2901 size-full" title="css hack 各大浏览器 CSS Hack 收集" src="http://zhoumo123.cn/wp-content/uploads/2015/06/css-hack.jpg" alt="css hack 各大浏览器 CSS Hack 收集" width="509" height="512" /></a></p>
<p><strong>Firefox 浏览器</strong></p>
<p>@-moz-document url-prefix() {<br />
.selector {<br />
property: value;<br />
}<br />
}</p>
<p>支持所有Gecko内核的浏览器 (包括Firefox)</p>
<p>*&gt;.selector { property: value; }</p>
<p><strong>Webkit 内核浏览器</strong></p>
<p>@media screen and (-webkit-min-device-pixel-ratio: 0) {<br />
Selector {<br />
property: value;<br />
}<br />
}</p>
<p><strong>Opera 浏览器</strong></p>
<p>html:first-child&gt;b\ody Selector {property:value;}</p>
<p><strong>IE 浏览器</strong></p>
<p>IE 浏览器针对不同的版本有不同个Hack方式。</p>
<p><strong>IE 9</strong></p>
<p>:root Selector {property: value\9;}</p>
<p><strong>IE 9-</strong></p>
<p>Selector {property: value\9;}</p>
<p><strong>IE 8</strong></p>
<p>Selector {property: value/;}</p>
<p>或：<br />
@media \0screen {<br />
Selector {property: value;}<br />
}</p>
<p><strong>IE 8+</strong></p>
<p>Selector {property: value\0;}</p>
<p><strong>IE 7</strong></p>
<p>*+html Selector{property:value;}</p>
<p>或：<br />
*:first-child+html Selector {property:value;}</p>
<p><strong>IE 7-</strong></p>
<p>Selector {*property: value;}</p>
<p><strong>IE6</strong></p>
<p>Selector {<br />
_property: value;<br />
}</p>
<p>或者：<br />
*html Selector {<br />
property: value;<br />
}</p>
<p><span style="color: #808080;">http://developer.51cto.com/art/201506/479564.htm</span></p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/2900.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>手机图片视频自适应代码max-width:100%;实现图片视频自动缩放</title>
		<link>http://zhoumo123.cn/web/html5/2445.html</link>
		<comments>http://zhoumo123.cn/web/html5/2445.html#comments</comments>
		<pubDate>Thu, 29 Jan 2015 03:40:36 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[web开发]]></category>
		<category><![CDATA[自适应布局]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=2445</guid>
		<description><![CDATA[无论浏览器窗口的大小还是在手机屏幕上如何做到图片自适应自动缩放呢，只需要一行CSS代码： img { max-width: 100%;} /*针对图片*/ object { max-width: 100%;} /*针对视频*/ img, object { max-width: 100%;} /*针对图片和视频*/ &#160; 可以通过本站看一下图片缩放效果。如：http://zhoumo123.cn/category/web]]></description>
				<content:encoded><![CDATA[<p>无论浏览器窗口的大小还是在手机屏幕上如何做到图片自适应自动缩放呢，只需要一行CSS代码：</p>
<p>img { max-width: 100%;} /*针对图片*/<br />
object { max-width: 100%;} /*针对视频*/<br />
img, object { max-width: 100%;} /*针对图片和视频*/</p>
<p><a href="http://img.zhoumo123.cn/wp-content/uploads/2015/01/css-img-1.jpg"><img class="alignnone size-full wp-image-2446" src="http://img.zhoumo123.cn/wp-content/uploads/2015/01/css-img-1.jpg" alt="css-img-1" width="464" height="259" /></a></p>
<p>&nbsp;</p>
<p>可以通过本站看一下图片缩放效果。如：http://zhoumo123.cn/category/web</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/html5/2445.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>css选择器：标签选择器的用法</title>
		<link>http://zhoumo123.cn/web/css/1775.html</link>
		<comments>http://zhoumo123.cn/web/css/1775.html#comments</comments>
		<pubDate>Thu, 06 Nov 2014 11:25:43 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[css选择器]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=1775</guid>
		<description><![CDATA[最常用的选择器类型是标签选择器。标签选择器可用来寻找特定类型的元素，如段落、超链接或标题元素，只需指定希望应用样式的元素的名称。标签选择器有时候也称为元素选择器或简单选择器。 例如，下面3个样式分别定义段落字体颜色为黑色，超链接显示为下划线，一级标题显示为粗体效果。 &#160; p{ color:black;} a{ text-decoration:underline;} h1{ font-weight:bold;} 使用标签选择器时，应该考虑该类型选择器的优缺点。 优点：能够快速为页面中同类型的标签统一样式。 缺点：不能设计差异化样式，有时候会相互干扰。 例如，如果在网页样式表中定义如下样 ...  <a href="http://zhoumo123.cn/web/css/1775.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>最常用的选择器类型是标签选择器。标签选择器可用来寻找特定类型的元素，如段落、超链接或标题元素，只需指定希望应用样式的元素的名称。标签选择器有时候也称为元素选择器或简单选择器。</p>
<p>例如，下面3个样式分别定义段落字体颜色为黑色，超链接显示为下划线，一级标题显示为粗体效果。</p>
<p>&nbsp;</p>
<p>p{ color:black;}<br />
a{ text-decoration:underline;}<br />
h1{ font-weight:bold;}</p>
<p>使用标签选择器时，应该考虑该类型选择器的优缺点。</p>
<p>优点：能够快速为页面中同类型的标签统一样式。</p>
<p>缺点：不能设计差异化样式，有时候会相互干扰。</p>
<p>例如，如果在网页样式表中定义如下样式，把所有div元素对象都定义为宽度为774px。</p>
<p>div{ width:774px;}</p>
<p>那么当用div进行布局时，就需要重新为页面中每个div对象定义宽度，因为在页而中并不是每个div元素对象的宽度都显示为774px，否则将是件非常麻烦的事情。</p>
<p>那么在什么情况下选用标签选择器呢？</p>
<p>如果希望为标签定义默认样式时，可以使用标签选择器。例如，使用ul元素时，它会自动缩进，并自带列表符号，有时这种样式会给列表布局带来麻烦，此时可以选择ul元素作为标签选择器，并清除预定义样式。</p>
<p>ul{<br />
margin:0px;<br />
list-style:none;<br />
}</p>
<p>如果希望统一文档中标签的样式，也可以使用标签选择器。例如，在下而样式表片段中通过body标签选择器统一文档字体大小、行高和字体，通过table标签选择器统一表格的字体样式，通过a标签选择器清除所有超链接的下划线，通过img标签选择器清除网页图像的边框，当图像嵌入a元素中，即作为超链接对象时会出现边框，通过input标签选择器统一输入表单的边框为浅灰色的实线。</p>
<p><a href="http://zhoumo123.cn/web/css/1775.html/attachment/biaoqianxuanzeqi" rel="attachment wp-att-1776"><img class="alignnone wp-image-1776 size-full" title="css选择器：标签选择器的用法" src="http://img.zhoumo123.cn/wp-content/uploads/biaoqianxuanzeqi.jpg" alt="css选择器：标签选择器的用法" width="663" height="220" /></a></p>
<p>对于div、span等通用结构元素，不建议使用标签选择器，因为通用结构元素的应用范围广泛，使用标签选择器会相互干扰。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/1775.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
