返回顶部小按钮

来源:互联网 发布:mac合上盖子不休眠 编辑:程序博客网 时间:2024/04/30 08:32

1、Html部分

<div class="upBox">    <a class="scrollUp" href="#top" title="返回顶部"></a></div>
2、Less部分

.upBox{  position: fixed;  right: 20px;  bottom:20px;  width: 40px;  height: 40px;  background: #eee;  z-index: 99;  .scrollUp{    position: fixed;    right:33px;    bottom:33px;    border-left: 6px solid transparent;    border-right: 6px solid transparent;    border-bottom: 12px solid #777;    z-index: 100;  }}.upBox:hover {  .scrollUp {    border-bottom: 12px solid #333;    background: #e9e9e9;  }}