<?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; web开发</title>
	<atom:link href="http://zhoumo123.cn/category/web/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>html5使用DeviceMotionEvent实现摇一摇</title>
		<link>http://zhoumo123.cn/web/html5/3394.html</link>
		<comments>http://zhoumo123.cn/web/html5/3394.html#comments</comments>
		<pubDate>Tue, 01 Dec 2015 05:45:36 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3394</guid>
		<description><![CDATA[&#60;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/html4/loose.dtd&#8221;&#62; &#60;html&#62; &#60;head&#62; &#60;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html;charset=utf-8&#8243;&#62; &#60;title&#62; html5使用DeviceMotionEvent实现摇一摇  ...  <a href="http://zhoumo123.cn/web/html5/3394.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/html4/loose.dtd&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html;charset=utf-8&#8243;&gt;<br />
&lt;title&gt; html5使用DeviceMotionEvent实现摇一摇 &lt;/title&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
.center{position:absolute; width:640px; height:480px; left:50%; top:50%; margin-left:-320px; margin-top:-240px; line-height:480px; text-align:center; font-size:100px; }<br />
.normal{background:#000000;}<br />
.normal .txt{color:#FFFFFF;}<br />
.doing{background:#FF0000;}<br />
.doing .txt{color:#FFFF00;}<br />
&lt;/style&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body id=&#8221;mybody&#8221; class=&#8221;normal&#8221;&gt;<br />
&lt;div id=&#8221;txt&#8221; class=&#8221;txt center&#8221;&gt;请执行摇一摇&lt;/div&gt;<br />
&lt;/body&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var doing = 0; // 判断是否在动画显示中<br />
var speed = 23; // 定义摇动的速度数值<br />
var lastx = 0;<br />
var lasty = 0;<br />
var lastz = 0;</p>
<p>function handleMotionEvent(event) {<br />
var x = event.accelerationIncludingGravity.x;<br />
var y = event.accelerationIncludingGravity.y;<br />
var z = event.accelerationIncludingGravity.z;</p>
<p>if(doing==0){<br />
if(Math.abs(x-lastx)&gt;speed || Math.abs(y-lasty)&gt;speed){<br />
doing = 1;<br />
show();<br />
}<br />
}</p>
<p>lastx = x;<br />
lasty = y;<br />
lastz = z;<br />
}</p>
<p>function show(){<br />
document.getElementById(&#8216;mybody&#8217;).className = &#8216;doing';<br />
document.getElementById(&#8216;txt&#8217;).innerHTML = &#8216;执行了摇一摇';<br />
setTimeout(function(){<br />
doing=0;<br />
document.getElementById(&#8216;mybody&#8217;).className=&#8217;normal';<br />
document.getElementById(&#8216;txt&#8217;).innerHTML = &#8216;请执行摇一摇';<br />
},3000);<br />
}</p>
<p>window.addEventListener(&#8220;devicemotion&#8221;, handleMotionEvent, true);<br />
&lt;/script&gt;</p>
<p>&lt;/html&gt;</p>
<p>&nbsp;</p>
<p>http://blog.csdn.net/fdipzone/article/details/50103027</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/html5/3394.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery获取一组单选按钮的值</title>
		<link>http://zhoumo123.cn/web/jquery/3359.html</link>
		<comments>http://zhoumo123.cn/web/jquery/3359.html#comments</comments>
		<pubDate>Wed, 28 Oct 2015 06:24:46 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3359</guid>
		<description><![CDATA[var sexVal=$(&#8220;input:radio[name=&#8217;sex&#8217;][checked]&#8221;).val(); alert(sexVal);]]></description>
				<content:encoded><![CDATA[<p>var sexVal=$(&#8220;input:radio[name=&#8217;sex&#8217;][checked]&#8221;).val();<br />
alert(sexVal);</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/jquery/3359.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>JavaScript去除字符串前后空格的trim方法</title>
		<link>http://zhoumo123.cn/web/jquery/3160.html</link>
		<comments>http://zhoumo123.cn/web/jquery/3160.html#comments</comments>
		<pubDate>Tue, 14 Jul 2015 06:33:29 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3160</guid>
		<description><![CDATA[相比vbscript，javascript在字符串处理方面已经很强大了，但是偏偏缺少去除字符串前后空格的trim方法。 http://alany.blog.51cto.com/6125308/1658938]]></description>
				<content:encoded><![CDATA[<p>相比vbscript，javascript在字符串处理方面已经很强大了，但是偏偏缺少去除字符串前后空格的trim方法。</p>
<pre class="brush: java; title: ; notranslate">
//clear the right and left space
function trim(s){
return trimRight(trimLeft(s));
}

//clear the left space
function trimLeft(s){
if(s == null) {
return &quot;&quot;;
}
var whitespace = new String(&quot; \t\n\r&quot;);
var str = new String(s);
if (whitespace.indexOf(str.charAt(0)) != -1) {
var j=0, i = str.length;
while (j &amp;lt; i &amp;amp;&amp;amp; whitespace.indexOf(str.charAt(j)) != -1){
j++;
}
str = str.substring(j, i);
}
return str;
}

//clear the right space
function trimRight(s){
if(s == null) return &quot;&quot;;
var whitespace = new String(&quot; \t\n\r&quot;);
var str = new String(s);
if (whitespace.indexOf(str.charAt(str.length-1)) != -1){
var i = str.length - 1;
while (i &amp;gt;= 0 &amp;amp;&amp;amp; whitespace.indexOf(str.charAt(i)) != -1){
i--;
}
str = str.substring(0, i+1);
}
return str;
}

</pre>
<p>http://alany.blog.51cto.com/6125308/1658938</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/jquery/3160.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
