css回到頂部

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
	.backToTop {
		width:22px; 
		height:70px;
		display:block; 
		background: url(img/icons.png) no-repeat 0 0; 
		position: fixed; 
		/*left: 50%; 
		margin-left: 490px;*/
		right:0px;
		bottom: 125px; 
		z-index: 10000;
	}

	*html .backToTop {
		position: absolute; 
		left: 50%; 
		margin-left:500px; 
		z-index: 10000; 
		bottom:auto; top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-125-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));
	}
</style>
<script type="text/javascript" src="jquery.js"></script>

</head>

<body style="height:3000px;">
<a href="#" class="backToTop"></a>
</body>
</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章