2.8 添加回到顶部按钮
1. 新增top.ejs文件
top.ejs文件<div id="top">
<a href="#">▲</a>
<a href="#footer">▼</a>
</div>2. 添加到页面中
<%- partial('top') %>3. 添加样式
#top
width 30px
height 50px
background rgba(85, 85, 85, 0.3) none repeat scroll 0% 0%
position fixed
bottom 1%
right 3%
text-align center
cursor pointer
a
display block
font-size 18px
line-height 25px
color #FFF
text-decoration none
a:hover
background-color #258FB8
Last updated