<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>前端设计_页面重构</title>
	
	<link>http://www.funnyapple.com</link>
	<description>Jessica</description>
	<lastBuildDate>Fri, 13 Apr 2012 08:47:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/FrontEndBeautiful" /><feedburner:info uri="frontendbeautiful" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://www.funnyapple.com/?pushpress=hub" /><media:copyright>Jessica</media:copyright><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Software How-To</media:category><feedburner:emailServiceId>FrontEndBeautiful</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>‘return false’ vs ‘e.preventDefault()’</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/NkThnJGRStU/the-difference-between-return-false-and-preventdefault.html</link>
		<comments>http://www.funnyapple.com/the-difference-between-return-false-and-preventdefault.html#comments</comments>
		<pubDate>Fri, 13 Apr 2012 08:47:11 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[IT Skill]]></category>
		<category><![CDATA[JavaScript & Jquery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=651</guid>
		<description><![CDATA[介绍下&#8217;return false&#8217;和&#8217;event.preventDefault()&#8217;之间的不同开始，先知道preventDefault() preventDefault() 定义 取消事件的默认动作。 比如&#60;a href=&#8221;http://www.funnyapple.com&#62;Jessica&#60;/a&#62;,默认行为是跳转链接到http://www.funnyapple.com。那么preventDefault可以阻止它的默认行为而执行其他事件。 再来说说return false，它会阻止所有事件。 换句话来说 function(){ return false; } // IS EQUAL TO function(e) { e.preventDefault(); e.stopPropagation(); } 查看demo]]></description>
			<content:encoded><![CDATA[<p>介绍下&#8217;return false&#8217;和&#8217;event.preventDefault()&#8217;之间的不同开始，先知道preventDefault()</p>
<h3>preventDefault() 定义</h3>
<p>取消事件的默认动作。</p>
<p>比如<cite>&lt;a href=&#8221;http://www.funnyapple.com&gt;Jessica&lt;/a&gt;</cite>,默认行为是跳转链接到http://www.funnyapple.com。那么preventDefault可以阻止它的默认行为而执行其他事件。</p>
<p>再来说说return false，它会阻止所有事件。</p>
<p>换句话来说</p>
<pre>
<code>
function(){
  return false;
}

// IS EQUAL TO

function(e) {
  e.preventDefault();
  e.stopPropagation();
}
</code>
</pre>
<p><a href="http://www.funnyapple.com/return-false-vs-e-preventdefault" target="_blank">查看demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/the-difference-between-return-false-and-preventdefault.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/the-difference-between-return-false-and-preventdefault.html</feedburner:origLink></item>
		<item>
		<title>关于meta keywords那些事儿</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/y1ByihKS7Vs/something-about-meta-keywords.html</link>
		<comments>http://www.funnyapple.com/something-about-meta-keywords.html#comments</comments>
		<pubDate>Sat, 03 Dec 2011 16:23:59 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[keywords]]></category>
		<category><![CDATA[meta]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=633</guid>
		<description><![CDATA[<h3>摘自wiki：The keywords attribute</h3>
<p>Search engines began dropping support for metadata provided by the meta element in 1998, and by the early 2000s, most search engines had veered completely away from reliance on meta elements. In July 2002, AltaVista, one of the last major search engines to still offer support, finally stopped considering them.</p>
<p>No consensus exists whether or not the keywords attribute has any effect on ranking at any of the major search engines today. It is speculated that it does, if the keywords used in the meta can also be found in the page copy itself. With respect to Google, thirty-seven leaders in search engine optimization concluded in April 2007 that the relevance of having your keywords in the meta-attribute keywords is little to none and in September 2009 Matt Cutts of Google announced that they are no longer taking keywords into account whatsoever. However, both these articles suggest that Yahoo! still makes use of the keywords meta tag in some of its rankings. Yahoo! itself claims support for the keywords meta tag in conjunction with other factors for improving search rankings. In Oct 2009 Search Engine Round Table announced that "Yahoo Drops The Meta Keywords Tag Also" but informed us that the announcement made by Yahoo's Senior Director of Search was incorrect. In the corrected statement Yahoo Senior Director of Search states that "...What changed with Yahoo's ranking algorithms is that while we still index the meta keyword tag, the ranking importance given to meta keyword tags receives the lowest ranking signal in our system.... it will actually have less effect than introducing those same words in the body of the document, or any other section.</p>
]]></description>
			<content:encoded><![CDATA[<style type="text/css">
.entry table{color:#999;width:100%;line-height:2;}
.entry table thead th{text-align:center;}
.entry table th{border:1px solid #ddd;padding:0 10px;}
.entry table td{border:1px solid #ddd;text-align:center;}
.entry table tbody th{width:40%}
.entry pre{color:#999;font-family:"Microsoft Yahei";line-height:2;}
.entry pre strong{font-weight:100;color:red;}
</style>
<p>昨天有位童鞋问我，有没有原始的文章说seo可以不用考虑keywords。我懵了，据记忆中所记得都要考虑keywords。但人家问了，说明应该是有搜索引擎已经放弃考虑keywords了，查了wiki和msdn。</p>
<h3>摘自wiki：The keywords attribute</h3>
<pre>

Search engines began dropping support for metadata provided by the meta element in 1998,
and by the early 2000s, most search engines had veered completely away from reliance on meta
elements. In July 2002, AltaVista, one of the last major search engines to still offer support, finally
stopped considering them.

No consensus exists whether or not the keywords attribute has any effect on ranking at any
of the major search engines today. It is speculated that it does, if the keywords used in the meta
can also be found in the page copy itself.<strong> With respect to Google, thirty-seven leaders in search
engine optimization concluded in April 2007 that the relevance of having your keywords in the
meta-attribute keywords is little to none and in September 2009 Matt Cutts of Google announced
that they are no longer taking keywords into account whatsoever.</strong> However, both these articles
suggest that Yahoo! still makes use of the keywords meta tag in some of its rankings. Yahoo! itself
claims support for the keywords meta tag in conjunction with other factors for improving search
rankings. In Oct 2009 Search Engine Round Table announced that "Yahoo Drops The Meta Keywords
Tag Also" but informed us that the announcement made by Yahoo's Senior Director of Search was
incorrect. In the corrected statement Yahoo Senior Director of Search states that<strong> "...What changed
 with Yahoo's ranking algorithms is that while we still index the meta keyword tag, the ranking
importance given to meta keyword tags receives the lowest ranking signal in our system.... it will
actually have less effect than introducing those same words in the body of the document, or any
other section.</strong>
</pre>
<h3>摘自msdn:</h3>
<pre>

HTML meta elements can be used to improve search-engine listings. <strong>The "keywords" meta
element is either not used at all or is given very little weight by the major search engines.</strong>

If there is no "keywords" meta element in the head element of the page markup, the meta
element is added to the page when the page is rendered. If the page markup already has a
"keywords" meta element, this property gets or sets the content attribute of the meta element.
</pre>
<p>在这里可以看出主流的搜索引擎算法中已经放弃考虑keywords，除了极少个数例如Yahoo还在考虑。作为本土的主流搜索引擎百度是否考虑？下面是我摘自《Search Engine Optimization for Baidu》的原话。</p>
<pre>

Like Google, Title tag is also very important. Unlike Google, Meta description and Meta
keywords tags are still very useful in improving ranking in Baidu. As always, we do recommend
clients add meaningful Meta description and keyword tags because they are still important for
some popular localized search engines.
</pre>
<p>从上述可以看出，百度搜索引擎还是考虑keywords和description。</p>
<p>让我们对比下google和baidu的关键因素的不同之处</p>
<table>
<thead>
<tr>
<th>&nbsp;</th>
<th>Google</th>
<th>Baidu</th>
</tr>
</thead>
<tbody>
<tr>
<th>Title</th>
<td>重要</td>
<td>重要</td>
</tr>
<tr>
<th> Meta Description </th>
<td> 小 </td>
<td> 重要 </td>
</tr>
<tr>
<th> Meta Keywords </th>
<td> 小 </td>
<td> 重要 </td>
</tr>
<tr>
<th> Heading Tags </th>
<td> 重要 </td>
<td> 重要 </td>
</tr>
<tr>
<th> Alt Tags </th>
<td> 小</td>
<td> 重要 </td>
</tr>
<tr>
<th>Internal Anchor Text</th>
<td> 重要 </td>
<td> 小 </td>
</tr>
<tr>
<th> External Anchor Text </th>
<td> 重要 </td>
<td> 小 </td>
</tr>
<tr>
<th> Quantity of Inbound Links </th>
<td> 小 </td>
<td> 重要 </td>
</tr>
<tr>
<th> Quality of Inbound Links </th>
<td> 重要 </td>
<td> 小 </td>
</tr>
<tr>
<th> Redirects and Robots.txt </th>
<td> 重要 </td>
<td> 小 </td>
</tr>
</tbody>
</table>
<p>唉，悲催，这样子其实做国内站点的优化还是得堆关键字~~~</p>
<p>竟然作为本土老大的百度，那么就来总结一下百度的seo优化tips</p>
<ol>
<li>1. Title and Meta Tags</li>
<li>2. Content</li>
<li>3. Linking</li>
<li>4. Content Language(由于百度是在中国大陆发展的，如果你的网站有简体中文，你的网站在百度上就很容易被搜索出来)</li>
<li>5. Alt Tag</li>
<li>6. Server</li>
<li>7. Geographical Market（中国是一个大市场，如果你的站点用户群体主要是中国大陆的，你的站点应当使用简体中文；如果你的目标市场是香港或者台湾，你的站点应该使用繁体中文。）</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/something-about-meta-keywords.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/something-about-meta-keywords.html</feedburner:origLink></item>
		<item>
		<title>关于JS预解析一道题</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/H-4J3og-oDw/one-about-js-pre-parse.html</link>
		<comments>http://www.funnyapple.com/one-about-js-pre-parse.html#comments</comments>
		<pubDate>Sun, 09 Oct 2011 10:54:34 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[JavaScript & Jquery]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=630</guid>
		<description><![CDATA[<pre><code>
var i=10;
function a() {
    alert(i);
    var i = 2;
    alert(i);
};
a();
</code></pre>
<p>挺经典的一道题，结果出得让人不得不觉得奇怪，想知道是虾米回事，内部到底是怎么执行的。</p>]]></description>
			<content:encoded><![CDATA[<pre><code>
var i=10;
function a() {
    alert(i);
    var i = 2;
    alert(i);
};
a();
</code></pre>
<p>挺经典的一道题，结果出得让人不得不觉得奇怪，想知道是虾米回事，内部到底是怎么执行的。</p>
<p>先看JS的执行行顺序</p>
<p>如果一个文档流中包含多个script代码段（用script标签分隔的js代码或引入的js文件），它们的运行顺序是：</p>
<ol>
<li>步骤1. 读入第一个代码段（js执行引擎并非一行一行地执行程序，而是一段一段地分析执行的）</li>
<li>步骤2. 做语法分析，有错则报语法错误（比如括号不匹配等），并跳转到步骤5</li>
<li>步骤3. 对var变量和function定义做“预解析”（永远不会报错的，因为只解析正确的声明）</li>
<li>步骤4. 执行代码段，有错则报错（比如变量未定义）</li>
<li>步骤5. 如果还有下一个代码段，则读入下一个代码段，重复步骤2</li>
<li>步骤6. 结束</li>
</ol>
<p>原来JS在执行过程之前，会对【var】和【function】定义做“预解析”。</p>
<p>解析引擎以块为单位级别，执行所有Var变量的创建，并赋予一个初始值undefined。这样子就能理解了为什么弹出undefined 2这样的答案而不是10 2。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/one-about-js-pre-parse.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/one-about-js-pre-parse.html</feedburner:origLink></item>
		<item>
		<title>CSS Reddit Alien</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/6KLyNJJXzAE/css-reddit-alien.html</link>
		<comments>http://www.funnyapple.com/css-reddit-alien.html#comments</comments>
		<pubDate>Sat, 08 Oct 2011 11:16:39 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[Share]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=611</guid>
		<description><![CDATA[<p>CSS很有趣。今天我用纯CSS和文本做一个Reddit alien 的 logo。它实际是一个链接，当你鼠标划上去时，会有所改变。我不是第一个用这种方式画图的人，Roman Cortes画的<a href="http://www.romancortes.com/blog/homer-css/">CSS Homer</a>是最好的CSS ASCII 艺术例子之一。</p>
<p>用文本和CSS画图的好处是它是可扩展的。如果你在你的浏览器改变字的大小，alien也随着变大变小。因为文字是矢量图形——这意味着CSS ASCII艺术是矢量艺术的一种格式。这也意味着不管你画多大，文件的大小一直都是不变的。如果你需要放一个大的Reddit alien在你的网站，图片的话大于8kb。你将更会（从文件大小方面考虑）选择用CSS版本。</p><p><a href="http://reddit.com"><span class="a">O</span><span class="b">O</span><span class="c">_</span><span class="d">(</span><span class="e">)</span><span class="f">(</span><span class="g">)</span><span class="h">O</span><span class="i">O</span><span class="j">O</span><span class="k">O</span><span class="l">/</span><span class="m">-</span><strong class="n">o</strong><strong class="o">O</strong><strong class="p">O</strong><strong class="q">O</strong><strong class="r">O</strong><strong class="s">O</strong><strong class="t">O</strong><span class="u">O</span><strong class="v">O</strong><strong class="w">•</strong><strong class="x">•</strong><span class="y">(</span><span class="z">)</span><span class="yy">(</span><span class="zz">)</span></a></p>]]></description>
			<content:encoded><![CDATA[<p>今天看到这篇有趣的文章，现在到处充斥着用CSS3实现各种效果，这篇就只使用简单的font-size，text和position实现的Reddit Alien。粗略地翻译了一下~~~</p>
<p>CSS很有趣。今天我用纯CSS和文本做一个Reddit alien 的 logo。它实际是一个链接，当你鼠标划上去时，会有所改变。我不是第一个用这种方式画图的人，Roman Cortes画的<a href="http://www.romancortes.com/blog/homer-css/">CSS Homer</a>是最好的CSS ASCII 艺术例子之一。</p>
<p>用文本和CSS画图的好处是可扩展的。如果你在你的浏览器改变字的大小，alien也随着变大变小。因为文字是矢量图形——这意味着CSS ASCII艺术是矢量艺术的一种格式。这也意味着不管你画多大，文件的大小一直都是不变的。如果你需要放一个大的Reddit alien在你的网站，图片的话大于8kb。你将更会（从文件大小方面考虑）选择用CSS版本。</p>
<p>那它是怎么做的呢？</p>
<p>实际很简单。这个alien是没有应用任何CSS——剥离掉后的裸奔链接</p>
<p><a href="http://reddit.com"><span class="a">O</span><span class="b">O</span><span class="c">_</span><span class="d">(</span><span class="e">)</span><span class="f">(</span><span class="g">)</span><span class="h">O</span><span class="i">O</span><span class="j">O</span><span class="k">O</span><span class="l">/</span><span class="m">-</span><strong class="n">o</strong><strong class="o">O</strong><strong class="p">O</strong><strong class="q">O</strong><strong class="r">O</strong><strong class="s">O</strong><strong class="t">O</strong><span class="u">O</span><strong class="v">O</strong><strong class="w">•</strong><strong class="x">•</strong><span class="y">(</span><span class="z">)</span><span class="yy">(</span><span class="zz">)</span></a></p>
<h3>The HTML</h3>
<pre><code>
&lt;a id="r-a" href="http://reddit.com"&gt;
&lt;span class="a"&gt;O&lt;/span&gt;
&lt;span class="b"&gt;O&lt;/span&gt;
&lt;span class="c"&gt;_&lt;/span&gt;
&lt;span class="d"&gt;(&lt;/span&gt;
&lt;span class="e"&gt;)&lt;/span&gt;
&lt;span class="f"&gt;(&lt;/span&gt;
&lt;span class="g"&gt;)&lt;/span&gt;
&lt;span class="h"&gt;O&lt;/span&gt;
&lt;span class="i"&gt;O&lt;/span&gt;
&lt;span class="j"&gt;O&lt;/span&gt;
&lt;span class="k"&gt;O&lt;/span&gt;
&lt;span class="l"&gt;/&lt;/span&gt;
&lt;span class="m"&gt;-&lt;/span&gt;
&lt;strong class="n"&gt;o&lt;/strong&gt;
&lt;strong class="o"&gt;O&lt;/strong&gt;
&lt;strong class="p"&gt;O&lt;/strong&gt;
&lt;strong class="q"&gt;O&lt;/strong&gt;
&lt;strong class="r"&gt;O&lt;/strong&gt;
&lt;strong class="s"&gt;O&lt;/strong&gt;
&lt;strong class="t"&gt;O&lt;/strong&gt;
&lt;span class="u"&gt;O&lt;/span&gt;
&lt;strong class="v"&gt;O&lt;/strong&gt;
&lt;strong class="w"&gt;•&lt;/strong&gt;
&lt;strong class="x"&gt;•&lt;/strong&gt;
&lt;span class="y"&gt;(&lt;/span&gt;
&lt;span class="z"&gt;)&lt;/span&gt;
&lt;span class="yy"&gt;(&lt;/span&gt;
&lt;span class="zz"&gt;)&lt;/span&gt;
&lt;/a&gt;
</code></pre>
<h3>The CSS</h3>
<p>CSS也非常简单。每个字符都是绝对定位的，单位是用em。这样允许我们更容易通过改变font-size这个参数从而达到改变alien的大小。</p>
<pre><code>
#r-a {
font-size:3em; /* change his size here */
width:5em;
height:3.3em;
overflow:hidden;
font-family:Verdana, Arial, sans-serif;
float:left;
background:#fff;
position:relative;
text-decoration:none;
color:#000;
}
#r-a span, #r-a strong {margin:0;padding:0;position:absolute;}
#r-a .a {left:1.65em;bottom:-.63em;}
#r-a .b {right:1.65em;bottom:-.63em;}
#r-a .c {left:.78em;bottom:-.08em;font-size:2.3em;}
#r-a .d {left:1em;bottom:0;font-size:1.8em;}
#r-a .e {right:1em;bottom:0;font-size:1.8em;}
#r-a .f {left:1.9em;bottom:.55em;font-size:.9em;}
#r-a .g {right:1.9em;bottom:.55em;font-size:.9em;}
#r-a .h {left:.84em;bottom:.55em;font-size:1.7em;}
#r-a .i {right:.84em;bottom:.55em;font-size:1.7em;}
#r-a .j {left:.83em;bottom:.41em;font-size:1.95em;}
#r-a .k {right:.83em;bottom:.41em;font-size:1.95em;}
#r-a .l {left:2.3em;bottom:2.1em;}
#r-a .m {left:2.57em;bottom:2.52em;}
#r-a .n {left:4.8em;bottom:4.55em;font-size:.6em;}
#r-a .o {left:1.8em;bottom:2.4em;font-size:.8em;}
#r-a .p {right:1.8em;bottom:2.4em;font-size:.8em;}
#r-a .q {left:1.01em;bottom:.6em;color:#fff;font-size:1.63em;}
#r-a .r {right:1.01em;bottom:.6em;color:#fff;font-size:1.63em;}
#r-a .s {left:1.14em;bottom:.8em;color:#fff;font-size:1.4em;}
#r-a .t {right:1.14em;bottom:.8em;color:#fff;font-size:1.4em;}
#r-a .u {left:1.53em;bottom:.9em;font-size:1.3em;}
#r-a .v {left:1.515em;bottom:.955em;font-size:1.29em;color:#fff;}
#r-a .w {left:2.7em;bottom:2.3em;font-size:.7em;color:#f30;}
#r-a .x {right:2.7em;bottom:2.3em;font-size:.7em;color:#f30;}
#r-a .y {left:.7em;bottom:1em;font-size:1.3em;color:#f30;}
#r-a .z {right:.7em;bottom:1em;font-size:1.3em;color:#f30;}
#r-a .yy {left:0;bottom:.495em;font-size:2em;color:#f30;}
#r-a .zz {right:0;bottom:.495em;font-size:2em;color:#f30;}
#r-a .y, #r-a .z, #r-a .yy, #r-a .zz {display:none;}
#r-a:hover .y, #r-a:hover .z, #r-a:hover .yy, #r-a:hover .zz {display:block;}
</code></pre>
<p style="font-size:16px;font-weight:700;color:#ef65a3">鼠标划过试看看~~~</p>
<div class="example">
<a id="r-a" href="http://reddit.com"><span class="a">O</span><span class="b">O</span><span class="c">_</span><span class="d">(</span><span class="e">)</span><span class="f">(</span><span class="g">)</span><span class="h">O</span><span class="i">O</span><span class="j">O</span><span class="k">O</span><span class="l">/</span><span class="m">-</span><strong class="n">o</strong><strong class="o">O</strong><strong class="p">O</strong><strong class="q">O</strong><strong class="r">O</strong><strong class="s">O</strong><strong class="t">O</strong><span class="u">O</span><strong class="v">O</strong><strong class="w">•</strong><strong class="x">•</strong><span class="y">(</span><span class="z">)</span><span class="yy">(</span><span class="zz">)</span></a>
</div>
<style type="text/css">
pre{background:#fcffcb;padding:10px;}
code{font-size:14px;font-family:Verdana,Arial,sans-serif;color:#666}
.example{line-height:normal;}
#r-a {
font-size:3em; /* change his size here */
width:5em;
height:3.3em;
overflow:hidden;
font-family:Verdana, Arial, sans-serif;
float:left;
background:#fff;
position:relative;
text-decoration:none;
color:#000;
}
#r-a span, #r-a strong {margin:0;padding:0;position:absolute;}
#r-a .a {left:1.65em;bottom:-.63em;}
#r-a .b {right:1.65em;bottom:-.63em;}
#r-a .c {left:.78em;bottom:-.08em;font-size:2.3em;}
#r-a .d {left:1em;bottom:0;font-size:1.8em;}
#r-a .e {right:1em;bottom:0;font-size:1.8em;}
#r-a .f {left:1.9em;bottom:.55em;font-size:.9em;}
#r-a .g {right:1.9em;bottom:.55em;font-size:.9em;}
#r-a .h {left:.84em;bottom:.55em;font-size:1.7em;}
#r-a .i {right:.84em;bottom:.55em;font-size:1.7em;}
#r-a .j {left:.83em;bottom:.41em;font-size:1.95em;}
#r-a .k {right:.83em;bottom:.41em;font-size:1.95em;}
#r-a .l {left:2.3em;bottom:2.1em;}
#r-a .m {left:2.57em;bottom:2.52em;}
#r-a .n {left:4.8em;bottom:4.55em;font-size:.6em;}
#r-a .o {left:1.8em;bottom:2.4em;font-size:.8em;}
#r-a .p {right:1.8em;bottom:2.4em;font-size:.8em;}
#r-a .q {left:1.01em;bottom:.6em;color:#fff;font-size:1.63em;}
#r-a .r {right:1.01em;bottom:.6em;color:#fff;font-size:1.63em;}
#r-a .s {left:1.14em;bottom:.8em;color:#fff;font-size:1.4em;}
#r-a .t {right:1.14em;bottom:.8em;color:#fff;font-size:1.4em;}
#r-a .u {left:1.53em;bottom:.9em;font-size:1.3em;}
#r-a .v {left:1.515em;bottom:.955em;font-size:1.29em;color:#fff;}
#r-a .w {left:2.7em;bottom:2.3em;font-size:.7em;color:#f30;}
#r-a .x {right:2.7em;bottom:2.3em;font-size:.7em;color:#f30;}
#r-a .y {left:.7em;bottom:1em;font-size:1.3em;color:#f30;}
#r-a .z {right:.7em;bottom:1em;font-size:1.3em;color:#f30;}
#r-a .yy {left:0;bottom:.495em;font-size:2em;color:#f30;}
#r-a .zz {right:0;bottom:.495em;font-size:2em;color:#f30;}
#r-a .y, #r-a .z, #r-a .yy, #r-a .zz {display:none;}
#r-a:hover .y, #r-a:hover .z, #r-a:hover .yy, #r-a:hover .zz {display:block;}
</style>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/css-reddit-alien.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/css-reddit-alien.html</feedburner:origLink></item>
		<item>
		<title>[每日一练]面向对象JavaScript继承例子一</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/9KBwPMNJI-I/javascript-inheritance-example-one.html</link>
		<comments>http://www.funnyapple.com/javascript-inheritance-example-one.html#comments</comments>
		<pubDate>Thu, 14 Jul 2011 09:54:50 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[IT Skill]]></category>
		<category><![CDATA[JavaScript & Jquery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=584</guid>
		<description><![CDATA[<pre><code>

	function Person(){
		this.name;
		this.age;
		this.sex;
		
		this.getName = function(){
			return this.name;
		}
		
		this.getSex = function(){
			return this.sex;
		}
		
		this.getAge = function(){
			return this.age;
		}
	}
	
	function Girl(){
		this.sex = "female";
		this.isSingle = true;
	}
	
	Girl.prototype = new Person();
	var jessica = new Girl();
	jessica.name = "Jessica";
	jessica.age = "24";

</code></pre>
<p>在面向对象的语言中，使用类来创建一个自定义对象。在JavaScript中一切都可以是对象，用什么办法来创建一个自定义对象？</p>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
pre code{display:block;color:#fff;background:#65b737;}
</style>
<pre style="margin-top:15px;"><code>
	function Person(){
		this.name;
		this.age;
		this.sex;

		this.getName = function(){
			return this.name;
		}

		this.getSex = function(){
			return this.sex;
		}

		this.getAge = function(){
			return this.age;
		}
	}

	function Girl(){
		this.sex = "female";
		this.isSingle = true;
	}

	Girl.prototype = new Person();
	var jessica = new Girl();
	jessica.name = "Jessica";
	jessica.age = "24";

</code></pre>
<p>RyanDing指点出JS也可以写得很有“性能”。上一段JS代码在效率上就很有问题，每次实例化的时候都需要将 getName，getSex ， getSex 给实例化出来。这些东西可以放在js特有的原型内。</p>
<p>对比下修改后的JS代码：</p>
<pre><code>
		function Person() {
		    this.name;  // 值传递，每次实例化后都会重新建立一个副本
		     this.age;
		    this.sex;
		}

		//实例化对象后进行引用传递不会建立新的内存副本。提高js性能
		Person.prototype.getName = function () {
		    return this.name;
		}

		Person.prototype.getSex = function () {
		    return this.sex;
		}

		Person.prototype.getAge = function(){
			return this.age;
		}

        function Girl() {
            this.sex = "female";
            this.isSingle = true;
        }

        // 将Girl的原型指向Person的一个实例
        // 因为Person的实例可以调用Person原型中的方法, 所以Girl的实例也可以调用Person原型中的所有属性
        Girl.prototype = new Person();
        var jessica = new Girl();
        jessica.name = "Jessica";
        jessica.age = "24";

</code></pre>
<p>在面向对象的语言中，使用类来创建一个自定义对象。在JavaScript中一切都可以是对象，用什么办法来创建一个自定义对象？</p>
<p>在这引入另外一个概念 &#8211; 原型（prototype）。函数Person称为构造函数，也就是创建自定义对象的函数。可以看出，JavaScript通过构造函数和原型的方式模拟实现了类的功能。 Girl从Person继承了原型prototype中的所有属性。 </p>
<p>对比一下C#代码：</p>
<pre><code>
	public class Person{
		public string name{
			set;
			get;
		}
		public string sex{
			set;
			get;
		}
		public string age{
			set;
			get;
		}
	}

	public class Girl : Person{
		base.sex = "female";
		public bool isSingle = true;

	}

	static void Main(string[] args){
		Girl jessica = new Girl();
		jessica.name = "Jessica";
		jessica.age = "24";
	}

</code></pre>
<p>继续学习ing&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/javascript-inheritance-example-one.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/javascript-inheritance-example-one.html</feedburner:origLink></item>
		<item>
		<title>文章-等不到的爱</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/xfQEsPCrw34/the-love-that-does-not-come.html</link>
		<comments>http://www.funnyapple.com/the-love-that-does-not-come.html#comments</comments>
		<pubDate>Wed, 13 Jul 2011 06:20:17 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=576</guid>
		<description><![CDATA[<p>《等不到的爱》未知是可怕的，而等待着未知的到来就让人无法释怀，可是“如果不是为那个期待”“如果拥抱没那么精彩”，有怎么会有等待？等待只是为了给寂寞找个借口，给伤心找个理由，或许当等待只能成为等待的时候，我们就能释怀。</p>]]></description>
			<content:encoded><![CDATA[<p>《等不到的爱》未知是可怕的，而等待着未知的到来就让人无法释怀，可是“如果不是为那个期待”“如果拥抱没那么精彩”，有怎么会有等待？等待只是为了给寂寞找个借口，给伤心找个理由，或许当等待只能成为等待的时候，我们就能释怀。</p>
<p><img src="http://photocdn.sohu.com/20110619/Img310686100.jpg" alt="裸婚时代"/></p>
<p><img src="http://photocdn.sohu.com/20110622/Img311289351.jpg" alt="裸婚时代"/></p>
<p><img src="http://photocdn.sohu.com/20110625/Img311633017.jpg" alt="裸婚时代"/></p>
<p>MP3地址：<a href='http://zhangmenshiting.baidu.com/data/music/5849256/%E7%AD%89%E4%B8%8D%E5%88%B0%E7%9A%84%E7%88%B1.mp3?xcode=54da4c2cd452c344843424b4045d5199' >等不到的爱</a></p>
<p>你深邃的眼眸 想要透漏什么密码</p>
<p>犹豫的嘴角 躲在严肃的背影下</p>
<p>压抑的空气 回绕闭塞的城堡里</p>
<p>谜一般的天鹅</p>
<p>有你说不尽的故事</p>
<p>孤独的身影</p>
<p>只有钟声陪伴</p>
<p>敲进了城堡却敲不进你的心</p>
<p>冷淡的表情</p>
<p>只剩风霜遮掩我的身躯</p>
<p>遮住了天地遮不住你的情 　</p>
<p>你在等待着谁</p>
<p>建筑了城堡</p>
<p>等待着天鹅的栖息</p>
<p>藏不住你空虚的心灵</p>
<p>你在眺望着谁</p>
<p>拥有了世界</p>
<p>却拥有不了平凡的爱</p>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/the-love-that-does-not-come.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://zhangmenshiting.baidu.com/data/music/5849256/%E7%AD%89%E4%B8%8D%E5%88%B0%E7%9A%84%E7%88%B1.mp3?xcode=54da4c2cd452c344843424b4045d5199" length="1242" type="audio/mpeg" />
		<media:content url="http://zhangmenshiting.baidu.com/data/music/5849256/%E7%AD%89%E4%B8%8D%E5%88%B0%E7%9A%84%E7%88%B1.mp3?xcode=54da4c2cd452c344843424b4045d5199" fileSize="1242" type="audio/mpeg" /><feedburner:origLink>http://www.funnyapple.com/the-love-that-does-not-come.html</feedburner:origLink></item>
		<item>
		<title>[每日一学]live vs bind</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/hrlip2my_cM/live-vs-bind.html</link>
		<comments>http://www.funnyapple.com/live-vs-bind.html#comments</comments>
		<pubDate>Mon, 18 Apr 2011 04:04:45 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[IT Skill]]></category>
		<category><![CDATA[JavaScript & Jquery]]></category>
		<category><![CDATA[Jquery]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=569</guid>
		<description><![CDATA[<p>live()与bind()不同的是一次只能绑定一个事件。</p>
<p>这个方法跟传统的bind很像，区别在于用live来绑定事件会给所有当前以及将来在页面上的元素绑定事件(使用委派的方式)。比如说，如果你给页面上所有的li用live绑定了click事件。那么当在以后增加一个li到这个页面时，对于这个新增加的li，其click事件依然可用。而无需重新给这种新增加的元素绑定事件。</p> 
<p>要移除用live绑定的事件，请用die方法</p>
]]></description>
			<content:encoded><![CDATA[<p>live()与bind()不同的是一次只能绑定一个事件。</p>
<p>这个方法跟传统的bind很像，区别在于用live来绑定事件会给所有当前以及将来在页面上的元素绑定事件(使用委派的方式)。比如说，如果你给页面上所有的li用live绑定了click事件。那么当在以后增加一个li到这个页面时，对于这个新增加的li，其click事件依然可用。而无需重新给这种新增加的元素绑定事件。</p>
<p>要移除用live绑定的事件，请用die方法</p>
<h3>Html</h3>
<pre><code>
		&lt;a class="a1" href="#"&gt;A1&lt;/a&gt;
		&lt;a class="a2" href="#"&gt;A2&lt;/a&gt;
		&lt;a class="a3" href="#"&gt;A3&lt;/a&gt;
		&lt;ul&gt;
			&lt;li&gt;&lt;a href="#"&gt;node one&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="#"&gt;node two&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;a href="#" class="addli"&gt;添加新元素&lt;/a&gt;
</code>
<h3>Jquery</h3>
<pre><code>
		$(".a1").live("click",function(event){
			alert("A1 with live event");
		})

		$(".a2").click(function(){
			alert("A2 with normal click event");
		})

		$(".a3").bind("click",function(){
			alert("A3 with bind event");
		})

		//测试die
		//$(".a1").die("click");   //click事件被移除
		//$(".a2").die("click");   //click事件依然有效
		//$(".a3").die("click");   //click事件依然有效

		//测试unbind
		//$(".a1,.a2,.a3").unbind("click");  //A1的click事件依然有效，A2和A3的click事件被删除

		//测试live和bind的区别
		/*$("ul > li > a").live("click",function(event){
			alert("test");
		})*/
		/*$("ul > li > a").bind("click",function(){
			alert("test");
		})*/
		/*$(".addli").click(function(){
			$("ul").append('&lt;li&gt;&lt;a href="#"&gt;new node&lt;/a&gt;&lt;/li&gt;');
		})*/
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/live-vs-bind.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/live-vs-bind.html</feedburner:origLink></item>
		<item>
		<title>四月份随笔</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/Dnwcqw_i66E/559.html</link>
		<comments>http://www.funnyapple.com/559.html#comments</comments>
		<pubDate>Thu, 07 Apr 2011 02:47:51 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=559</guid>
		<description><![CDATA[<p>我来上海8个月，很多人不理解我为什么离开厦门离开外企，即使这段时间同事叫我回去我依然坚持自己的决定，我一直知道自己想要什么，为什么要离开，我不停脚步地一直往前走，有人说我走得洒脱，走得勇敢，只因为我一直朝着目标，朝着梦想前进。好比如在黑暗中有一束光，你不在乎你脚下的路是有多崎岖，有多坎坷。经常我跟我朋友们说：你有自己的职业计划和人生计划吗？如果我在此刻跌倒，我会想把某一段计划提前，这过程只打乱了这一段的步伐，并未改变主干路线。我不想做温水里的青蛙！</p>]]></description>
			<content:encoded><![CDATA[<p>我来上海8个月，很多人不理解我为什么离开厦门离开外企，即使这段时间同事叫我回去我依然坚持自己的决定，我一直知道自己想要什么，为什么要离开，我不停脚步地一直往前走，有人说我走得洒脱，走得勇敢，只因为我一直朝着目标，朝着梦想前进。好比如在黑暗中有一束光，你不在乎你脚下的路是有多崎岖，有多坎坷。经常我跟我朋友们说：你有自己的职业计划和人生计划吗？如果我在此刻跌倒，我会想把某一段计划提前，这过程只打乱了这一段的步伐，并未改变主干路线。我不想做温水里的青蛙！</p>
<p>这一路走得不孤单，我碰到很多好人，一直帮助我，让我这一年多里学到很多，我才能每一步走得这么坚定！</p>
<p>四月伊始，坚持每天学习，每天看书，知识是装备，不停地升级更换自己装备，才能有更强更有力的战斗力，才能在游戏中存活。<strong>人生就是一场荒谬的游戏，输输赢赢，过程是享受</strong>&#8230;&#8230;</p>
<style type="text/css">
#archive .entry{margin-top:32px;}
#archive .entry p{text-indent:24px;}
#archive .entry strong{color:#AA0505;font-size:16px;}
</style>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/559.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/559.html</feedburner:origLink></item>
		<item>
		<title>windows media player播放器把div给遮住的问题</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/7eyXMWzWEdo/the-problem-of-windows-media-player-cover-div.html</link>
		<comments>http://www.funnyapple.com/the-problem-of-windows-media-player-cover-div.html#comments</comments>
		<pubDate>Mon, 24 Jan 2011 09:37:15 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[前端]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[windows media player]]></category>
		<category><![CDATA[遮盖]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=552</guid>
		<description><![CDATA[<p>通常，我们碰到flash把div给遮住的问题。想到的解决方案都是：</p>
<p><strong>IE：</strong></p>
<pre><code>	&#60;param name="wmode" value="opaque"&#62;<code></pre>
<p><strong>Firefox：</strong></p>
<pre><code>	&#60;embed src="/xx.swf" quality="high" wmode="transparent"&#62;&#60;/embed&#62;</code></pre>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
.archive strong{font-weight:700;color:#333;}
pre code{color:#666;}
pre code em{color:#900;}
</style>
<p>通常，我们碰到flash把div给遮住的问题。想到的解决方案都是：</p>
<p><strong>IE：</strong></p>
<pre><code>	&lt;param name="wmode" value="opaque"&gt;<code></pre>
<p><strong>Firefox：</strong></p>
<pre><code>	&lt;embed src="/xx.swf" quality="high" wmode="transparent"&gt;&lt;/embed&gt;</code></pre>
<p>今天别人请教我的问题是windows media player播放器把div层给遮盖住。我想到的是用iframe,然后z-index关系是div&gt;iframe&gt;object</p>
<p>杯具的是，竟然不行，可把我纠结死了。后来查找到的解决的方法是：</p>
<pre><code><em>		&lt;param name="windowlessVideo" value="1"&gt;</em>&lt;!--如果是0可以允许全屏,否则只能在窗口中查看--></code></pre>
<p><img src="http://www.funnyapple.com/uploads/2011/01/1.jpg" alt="div在media player层之上" title="div在media player层之上" width="600" height="530"/></p>
<p>额外查了一下windowlessVideo的属性（from msdn）</p>
<p><img src="http://www.funnyapple.com/uploads/2011/01/windowlessVideo.jpg" alt="windowlessVideo" title="windowlessVideo" width="600" height="429"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/the-problem-of-windows-media-player-cover-div.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/the-problem-of-windows-media-player-cover-div.html</feedburner:origLink></item>
		<item>
		<title>Remove spaces between inline-block elements</title>
		<link>http://feedproxy.google.com/~r/FrontEndBeautiful/~3/DcpMlr4DvNQ/remove-spaces-between-inline-block-elements.html</link>
		<comments>http://www.funnyapple.com/remove-spaces-between-inline-block-elements.html#comments</comments>
		<pubDate>Wed, 10 Nov 2010 09:27:03 +0000</pubDate>
		<dc:creator>Jessica</dc:creator>
				<category><![CDATA[IT Skill]]></category>
		<category><![CDATA[前端]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.funnyapple.com/?p=538</guid>
		<description><![CDATA[<p>今天下午三思问我，关于inline-block元素之间的缝隙怎么去除，怎么做到inline一样？</p>
<p><img src="http://www.funnyapple.com/uploads/2010/11/1.png" alt="犁地哥"/></p>
<p>其实对于这个问题的解决方法就是<strong>删除换行</strong>。</p>
<p><img src="http://www.funnyapple.com/uploads/2010/11/5.png" alt="删除空格" /></p>
]]></description>
			<content:encoded><![CDATA[<p>今天下午三思问我，关于inline-block元素之间的缝隙怎么去除，怎么做到inline一样？</p>
<p><img src="http://www.funnyapple.com/uploads/2010/11/1.png" alt="犁地哥"/></p>
<p>其实对于这个问题的解决方法就是<strong>删除换行</strong>。</p>
<p><img src="http://www.funnyapple.com/uploads/2010/11/5.png" alt="删除空格" /></p>
<p>不过从重构人员给出“产品”给研发，为了便于研发嵌套页面，一般都是给很清晰的代码，如：</p>
<p><img src="http://www.funnyapple.com/uploads/2010/11/2.png" alt="未压缩的html"/></p>
<p><img src="http://www.funnyapple.com/uploads/2010/11/3.png" alt="压缩后的html" /></p>
<p>在此我们又要保证清晰的代码，又要保证压缩前与压缩后，我们的inline-block元素之间都不希望出现space，那怎么办？</p>
<p>对于重构和研发配合之间这是一种最优的解决方案：
<p><img src="http://www.funnyapple.com/uploads/2010/11/4.png" alt="解决方案"/></p>
<p>为什么说它是最优解决方案呢？在最后产出的页面，一般都会进行压缩操作删除空格及注释之类。你觉得这种方案好吗？如果不好，你有什么更好的方法一起分享？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.funnyapple.com/remove-spaces-between-inline-block-elements.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://www.funnyapple.com/remove-spaces-between-inline-block-elements.html</feedburner:origLink></item>
	<copyright>Jessica</copyright><media:credit role="author">Jessica</media:credit><media:rating>adult</media:rating></channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->

