微信掃碼登錄 ×
jquery制作非??蓯?ài)的火箭筒返回頂部_帶動(dòng)畫效果的返回頂部按鈕

jquery制作非??蓯?ài)的火箭筒返回頂部_帶動(dòng)畫效果的返回頂部按鈕

收藏
jquery制作非??蓯?ài)的火箭筒返回頂部_帶動(dòng)畫效果的返回頂部按鈕
jquery星空火箭置頂,返回頁(yè)面頂部,有動(dòng)畫效果

使用方法:

1、head引入css文件

<style type="text/css">
body{background:url(images/blog7year_videobg.png);}

/* actGotop */
.actGotop{position:fixed;top:0;margin:480px 0 0 0;right:50px;width:150px;height:195px;display:none;}
*html .actGotop{position:absolute;top:expression(eval(document.documentElement.scrollTop));}
.actGotop a,.actGotop a:link{width:150px;height:195px;display:inline-block;background:url(images/blog7year_gotop.png) no-repeat;_background:url(images/blog7year_gotop.gif) no-repeat;outline:none;}
.actGotop a:hover{width:150px;height:195px;background:url(images/blog7year_gotopd.gif) no-repeat;outline:none;}
</style>

2、head引入js文件

<script type="text/javascript" src="js/jquery.min.js"></script>

3、body引入部分

<div class="actGotop"><a href="javascript:;" title="Top"></a></div>

<script type="text/javascript">
$(function(){	
	$(window).scroll(function() {		
		if($(window).scrollTop() >= 100){
			$('.actGotop').fadeIn(300); 
		}else{    
			$('.actGotop').fadeOut(300);    
		}  
	});
	$('.actGotop').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);});	
});
</script>

使用聲明

1. 本站所有素材(未指定商用),僅限學(xué)習(xí)交流。
2. 會(huì)員在本站下載的原創(chuàng)商用和VIP素材后,只擁有使用權(quán),著作權(quán)歸原作者及17素材網(wǎng)所有。
3. 原創(chuàng)商用和VIP素材,未經(jīng)合法授權(quán),請(qǐng)勿用于商業(yè)用途,會(huì)員不得以任何形式發(fā)布、傳播、復(fù)制、轉(zhuǎn)售該素材,否則一律封號(hào)處理。
4. 本平臺(tái)織夢(mèng)模板僅展示和個(gè)人非盈利用途,織夢(mèng)系統(tǒng)商業(yè)用途請(qǐng)預(yù)先授權(quán)。

x
×
×

注冊(cè)

QQ注冊(cè) 立即下載 微信注冊(cè) 立即下載

簽到成功!

已連續(xù)簽到1天,連續(xù)簽到3天可獲得50積分

知道了