回到顶部CSS代码——兼容性良好

来源:互联网 发布:java云购系统源码下载 编辑:程序博客网 时间:2024/06/06 21:48
HTML:
  1. <a href="#"class="backToTop"></a>
CSS:
  1. .backToTop {width: 23px; height: 72px; display: block;background: url(../images/backToTop.png) no-repeat 0 0; position:fixed; left: 50%; margin-left: 490px; bottom: 125px; z-index:10000;}

  2. *html .backToTop {position: absolute; left: 50%; margin-left:500px; z-index: 10000; bottom:auto;top:expression_r(eval_r(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-125-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
* html,* html body{background-image:url(about:blank);background-attachment:fixed;}


0 0
原创粉丝点击