jquery.scrollfollow.js 浏览器上下滚动(浮动)

来源:互联网 发布:java float double 编辑:程序博客网 时间:2024/04/30 01:54
 

jquery.scrollfollow.js 浏览器上下滚动(浮动)

参照 http://kitchen.net-perspective.com/sf-example-1.html

[html] view plaincopy
  1. <span style="font-size:16px;">  <script type="text/javascript" src="jquery.js"></script>  
  2.   
  3.   
  4.     <script type="text/javascript" src="jquery.scroll-follow.js"></script></span>  

[javascript] view plaincopy
  1. <script type="text/javascript">  
  2.   
  3.         $( document ).ready( function ()  
  4.   
  5.         {  
  6.   
  7.             $( '#example' ).scrollFollow();  
  8.   
  9.         }  
  10.   
  11.     );  
  12.   
  13.     </script>  

html

[html] view plaincopy
  1. <div id="example">  
  2.   
  3.       
  4.   
  5.         <img src="/images/ducks.png" alt="Ducks" />  
  6.   
  7.           
  8.   
  9.         <p>  
  10.   
  11.             This is a simple example of Scroll Follow. Scroll down to see what happens.  
  12.   
  13.         </p>  
  14.   
  15.           
  16.   
  17.         <p>  
  18.   
  19.             <a href="http://kitchen.net-perspective.com/open-source/scroll-follow/">Back to Scroll Follow home.</a>  
  20.   
  21.         </p>  
  22.   
  23.     </div><!--end #example-->  

定义区域会随着浏览器滚动条的上下滚动,而移动(浮动在界面上)