text-align下的返回顶部功能实现实例页面

展示

回到相关文章 »

代码

CSS代码:
.sina_box{width: 960px; height: 2000px; margin: 0 auto; background: url(http://img1.t.sinajs.cn/t4/skin/skin000/images/body_bg.jpg) top center;}
.sina_backtop_box { text-align: right; }
.sina_backtop { width:20px; padding:5px 0; background-color: #DFF3FD; text-align:center; position: fixed; bottom: 100px; }
            
HTML代码:
<div class="sina_box">
    <div class="sina_backtop_box">
        &nbsp;<a href="#" class="sina_backtop">返回顶部</a>
    </div>
</div>