不设置botton,就不显示a标签?
<!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" xml:lang="en">
<head>
<title>Javascript 回到顶部效果</title>
<!-- <link rel="stylesheet" type="text/css" href="style.css" /> -->
<style>
.box{
width:1190px;
margin:0 auto;
}
#btn{
position:fixed;
width:40px;
height:40px;
left:50%;
/*bottom:30px;*/
margin-left: 610px;
background:url(images/top_bg.jpg) no-repeat left top;
}
</style>
</head>
<body>
<div>
<img src="images/tb_bg.jpg" />
</div>
<a href="javascript:;" id="btn" title="回到顶部"></a>
</body>
</html>