移动端回到顶部
来源:互联网 发布:城觅 网络异常 编辑:程序博客网 时间:2024/05/21 10:16
html:
<a href="javascript:goTop();" class="gotop"><img src="__STATIC__/images/topup.png"></a>
css:
.gotop{
display: block;
width: 40px;
height: 40px;
position: fixed;
bottom: 70px;
right: 8px;
background-color: rgba(243,241,241,0.5);
border: 1px solid #CCC;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
}
.gotop img{
display: block;
width: 40px;
height: 40px;
}
js:
<script src="__STATIC__/js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script>
function goTop(){
$('html,body').animate({'scrollTop':0},600);
}
</script>
阅读全文
0 0
- 移动端回到顶部
- jquery移动端回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- “回到顶部”
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- 回到顶部
- activemq的leveldb有脏数据,导致activemq集群一只主从切换
- 使用Xcode进行iOS设备无线调试
- 数据结构学习笔记(4)---静态与动态栈
- java 类库和框架中用到的设计模式
- oracle 表管理(三)
- 移动端回到顶部
- SpringCloud微服务实战
- 36.异常
- 通信 设备
- React-Native WebView 测量网页高度
- python学习历程——抽象(day 4)
- 视频动作识别--Two-Stream Convolutional Networks for Action Recognition in Videos
- android 基于豆瓣 Api 的客户端,包含电影分类,图书分类,电影榜单,收藏功能,搜索功能。
- BCG与阿里研究院等联合揭秘中国互联网经济:成功的关键是什么?