<?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>Simple happiness &#187; 滑动</title>
	<atom:link href="http://xfuxing.com/tag/%e6%bb%91%e5%8a%a8/feed" rel="self" type="application/rss+xml" />
	<link>http://xfuxing.com</link>
	<description>越简单越幸福</description>
	<lastBuildDate>Sun, 01 Jan 2012 16:55:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jquery滑动回顶部代码</title>
		<link>http://xfuxing.com/2009/jquery-sliding-back-to-the-top-of-the-code.html</link>
		<comments>http://xfuxing.com/2009/jquery-sliding-back-to-the-top-of-the-code.html#comments</comments>
		<pubDate>Wed, 22 Jul 2009 02:27:02 +0000</pubDate>
		<dc:creator>德海</dc:creator>
				<category><![CDATA[关注网络]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[回顶部]]></category>
		<category><![CDATA[滑动]]></category>

		<guid isPermaLink="false">http://xfuxing.com/abc/54</guid>
		<description><![CDATA[有时候因为网页太长，看到底部的时候再回到最上面的确是让人费劲的事情，拉动滚动条或用鼠标动作，太繁复了。在底部添加一个“返回顶部”的功能确实是不错，方法很多了，可以设锚点，可以用JS，不过这里要说的还是用jquery。代码也是很简单的，就不做说明了。]]></description>
			<content:encoded><![CDATA[<p>有时候因为网页太长，看到底部的时候再回到最上面的确是让人费劲的事情，拉动滚动条或用鼠标动作，太繁复了。在底部添加一个“返回顶部”的功能确实是不错，方法很多了，可以设锚点，可以用JS，不过这里要说的还是用jquery。代码也是很简单的，就不做说明了。<br />
<span id="more-54"></span><br />
<code><br />
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cn" lang="cn"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;<br />
&lt;title&gt;Top&lt;/title&gt;</p>
<p>&lt;script src="jquery-1.3.2.min.js" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
$(document).ready(function(){<br />
$('.gotop').click(function(){<br />
	$('html, body').animate({scrollTop: 0},300);<br />
});<br />
});<br />
--&gt;<br />
&lt;/script&gt;<br />
&lt;style type="text/css"&gt;</p>
<p>.gotop {<br />
	margin: 0;<br />
	padding: 0 20px;<br />
	height: 31px;<br />
	line-height: 31px;<br />
	border: 1px solid #999;<br />
	overflow: hidden;<br />
	position: relative;<br />
	background: #e0e0e0;<br />
	text-decoration: none;<br />
	color: #000;<br />
	display: block;<br />
	font-size: 1.2em;<br />
	outline: none;<br />
	cursor: hand;<br />
}<br />
#kk {<br />
	height:1000px;<br />
}</p>
<p>&lt;/style&gt;</p>
<p>&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;TOP!&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div id="kk"&gt;&lt;/div&gt;<br />
&lt;div&gt;<br />
&lt;ul&gt;<br />
&lt;li class="gotop"&gt;go to top!&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
<p><a href="http://xfuxing.com/2009/jquery-sliding-back-to-the-top-of-the-code.html">Simple happiness</a></p>
<h3  class="related_post_title">您可能感兴趣的文章</h3><ul class="related_post"><li>2009年07月23日 -- <a href="http://xfuxing.com/2009/jquery-dynamic-menu-navigation-code.html" title="jquery动感菜单（导航）代码">jquery动感菜单（导航）代码</a> (0)</li><li>2009年07月21日 -- <a href="http://xfuxing.com/2009/jquery-interlacing-color-code.html" title="jquery隔行变色代码">jquery隔行变色代码</a> (0)</li><li>2009年07月19日 -- <a href="http://xfuxing.com/2009/jquery-option-card-code.html" title="jquery选项卡代码">jquery选项卡代码</a> (0)</li><li>2010年08月28日 -- <a href="http://xfuxing.com/2010/php-program-on-the-internationalization-i18n-of-those-things.html" title="关于php程序国际化(i18n)的那些事">关于php程序国际化(i18n)的那些事</a> (2)</li><li>2010年08月27日 -- <a href="http://xfuxing.com/2010/php-remote-file-access-to-information-under-an-important-function-get_headers.html" title="php下获取远程文件信息的重要函数get_headers">php下获取远程文件信息的重要函数get_headers</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://xfuxing.com/2009/jquery-sliding-back-to-the-top-of-the-code.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

