<!doctype html> <html class="no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content=""> <meta name="keywords" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>平滑滚动</title> <!--[if (gte IE 9)|!(IE)]><!--> <script src="assets/js/jquery.min.js"></script> <!--<![endif]--> <!--[if lte IE 8 ]> <script src="assets/ie8/jquery.min.js"></script> <script src="assets/ie8/modernizr.js"></script> <script src="assets/js/amazeui.ie8polyfill.min.js"></script> <![endif]--> <script src="assets/js/amazeui.min.js"></script> <link rel="stylesheet" href="assets/css/amazeui.min.css"> </head> <body style="margin:300px;"> <!-- $('html, body').animate({scrollTop: 0}, '500'); //兼容旧版IE的写法 --> <div style="height: 2000px;"></div> <!-- 滚动到顶部 --> <button data-am-smooth-scroll class="am-btn am-btn-success">滚动到顶部</button> <!-- 滚动到底部 --> <button id="doc-scroll-to-btm" class="am-btn am-btn-primary">滚动到底部</button> <script> $('#doc-scroll-to-btm').on('click', function() { var $w = $(window); $w.smoothScroll({position: $(document).height() - $w.height()}); }); </script> <!-- 定义选项 --> <button data-am-smooth-scroll="{position: 57, speed: 5000}" class="am-btn am-btn-danger">慢悠悠地滚到距离顶部 57px 的位置</button> <!--通过 Data API--> <!-- 在元素上添加 data-am-smooth-scroll 属性。 --> <button data-am-smooth-scroll class="am-btn am-btn-success">滚动到顶部</button> <!-- 如果要指定滚动的位置,可以给这个属性设一个值。 --> <button data-am-smooth-scroll="{position: 189}" class="am-btn am-btn-secondary">指定滚动的位置</button> <!-- 通过 Javascript $(window).smoothScroll([options]); // 滚动到底部 $('#my-button').on('click', function() { var $w = $(window); $w.smoothScroll({position: $(document).height() - $w.height()}); }); --> <div style="height: 2000px;"></div> </body> </html>
效果图:
相关推荐
具体代码如下所示:
AmazeUI 需要的同学可以下载。
_后台 管理系统 系统 后台ui oa cms系统 login 登录 全屏 适应 左栏 后台界面 后台管理系统 Amaze ui 图表 ui管理界面
中国首个开源 HTML5 跨屏前端框架AmazeUI-1.0.1,Amaze UI 以移动优先(Mobile first)为理念,从小屏逐步扩展到大屏,最终实现所有屏幕适配,适应移动互联潮流。Amaze UI 含近 20 个 CSS 组件、10 个 JS 组件,更有...
基于amazeui头像上传,测试过,有php文件,网上很多都没有php导致上传失败了
wap 手机 移动端 新闻 Amaze UI
Amaze UI 手机wap登录页html模板_Amaze UI 手机 登录 login 注册 精美网页端模板,需要的朋友快点来吧
Amaze UI仿电脑版微信聊天界面HTML代码.zip
NULL 博文链接:https://onestopweb.iteye.com/blog/2277589
NULL 博文链接:https://onestopweb.iteye.com/blog/2277219
Amaze UI 博客 blog 简洁 个人主页 登录 login 前端框架
不错的前端框架,可以快速应用,不错的前端框架,可以快速应用,
Amaze UI 总的来说就是加入更多符合中国市场特性的元素,框架对跨屏、适配都做了的比较好的处理并且准备一了一系列的常用的网页组件,为减少搞兼容、适配各种敲键盘的加班狗们的工作时间做了不小的贡献。,框架还对...
NULL 博文链接:https://onestopweb.iteye.com/blog/2278105
AmazeUI-2.2.1.zip
Amazeui 插件tree 更新数据源,最近在做代码生成器时用到tree控件,但是需要不断改变数据源,去上网找没找到,就自己摸索着写了一个demo
自己测试使用的amazeUI的前端文件代码,包括如何使用,基本的使用都有注释
Amaze UI仿电脑版微信聊天界面 相似率相当高的微信网页版聊天界面样式, 一些基本的东西