网页中“返回顶部”的html代码怎么编写
1个回答
展开全部
<div class="scroll" id="scroll" style="display:none;">
<a href="#" class="backToTop">返回顶部</a>
</div>
.backToTop{width: 62px; height: 62px; display: block; background: url(../images/gotop_ico.png) -62px 0 no-repeat; position: fixed; right:40px; margin-left: 490px; bottom: 125px; z-index:999;}
.backToTop:hover{ background:url(../images/gotop_ico.png) no-repeat;}
*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)));}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询