点击回到顶部(jQuery)
写这个点击回到顶部。我采用的是最简单的jQuery,的点击事件 和animate特效。
html部分
<div class="pulltop">
<img src="img/top.png"/> </div>
jQuery
$(".pulltop").click(function () {
$("html,body").animate({scrollTop:'0px'},500); //回到顶部
});
等我会原生写的时候再和你们说哈 耶
点击回到顶部(jQuery)的更多相关文章
- URL链接后面的参数解析,与decode编码解码;页面刷新回到顶部jquery
function request() { var urlStr = location.search; ) { theRequest = []; return; } urlStr = urlStr.su ...
- jquery点击回到顶部
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- js点击回到顶部2
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>点 ...
- js点击回到顶部
---恢复内容开始--- <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> ...
- js+css实现点击回到顶部的效果(最低兼容至ie7)
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- Jquery回到顶部插件【query.scrollUp.js】使用
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta na ...
- 【JQ+锚标记实现点击页面回到顶部】
前言:今天想写个页面常用到的[点击回到页面顶部或是首页的功能],生活和职场一样,总会有低谷的时候,这个时候咱也别怂.别怂.别怂,说三遍!那都不是事,工作没了,再找呗,就像我上周五,团队解散那天,我是笑 ...
- UITableView 或 UIScrollView 点击状态栏列表回到顶部
整理来自互联网- 这是tableView继承的scrollView的一个属性 scrollsToTop. 官方说明是这样的: // When the user taps the status bar, ...
- 通过HTML+CSS+Javascript实现向下滚动滚动条出现导航栏并出现回到顶部按钮点击按钮回到顶部(一)
回到顶部实例一 效果:默认隐藏导航栏,当滚动条滚到超过300px后导航栏和按钮出现,点击回到顶部按钮回到顶部,并隐藏导航栏和按钮(导航栏和按钮都是固定定位) <!doctype html> ...
随机推荐
- 最新阿里云申请免费SSL证书实现网站HTTPS化(图文教程一)
一.申请免费SSL证书: 1.登录阿里云: 2.领取代金券礼包: https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=0a ...
- Excel无法打开文件xxx.xlsx,因为文件格式或文件扩展名无效。请确定文件未损坏,并且文件扩展名与文件的格式匹配
office版本:2016 系统版本:win10 问题描述: 1.桌面新建excel表格后,打开时,提示“Excel无法打开文件xxx.xlsx,因为文件格式或文件扩展名无效.请确定文件未损坏,并且文 ...
- Godot-富文本
作用:添加链接(比如赞助网站,或者相关站点什么的) 效果如下: (引用Godot官网) Introduction RichTextLabel allows the display of complex ...
- redis 简单的注册
首页写一个页面 <form method="post" action="hreg.php"> Name:<input type="t ...
- echart的x轴换行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 20165305 《网络对抗技术》 Kali安装
一.安装kali 在虚拟机中安装kali我参考了下面的网页,里面写的很全面,所以我就不重复了,我主要说一下kali里面的环境配置. 在虚拟机中安装kali linux 注意:输入用户和密码时,kali ...
- WdatePicker 日期区间设置
<input id="billsStartDate" name="billsStartDate" onclick="WdatePicker({d ...
- 在java中如何处理日期格式问题
1.最简洁的办法就是在对应的对象中加注解 如下一个例子: @DateTimeFormat(pattern="yyyy-MM-dd") @JsonFormat(pattern=&qu ...
- linux执行jmeter脚本解决响应数据为空
Linux服务器用命令执行了jmeter脚本,在本地查看结果时发现结果树种的“请求.响应数据”都显示为空,有错误日志中也看不出所以然,请看演示! 1 ,先执行脚本:执行成功(...end of run ...
- React Hooks (React v16.7.0-alpha)
:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdow ...