代码拉取完成,页面将自动刷新
A simple Angular.js directive to create "Back to top" button when user reaches the end of the page.
You can see a working demo here.
Assuming that you already have Angular.js in your app, include angular-backtop.js and angular-backtop.css.
You can also use Bower, just type:
bower install --save angular-backtop
Add directive as your dependency:
var app = angular.module('app', ['angular.backtop']);
Create directive element somewhere inside of your tag:
<back-top>Scroll top</back-top>
... and thats all, you have a basic button, that will appear when you start scrolling the page. Click on it to be redirected to the top.
You can pass some more options to the directive.
Example:
<back-top scroll-speed=600 button-theme="light">Take me back</back-top>
npm install
grunt karma:unit
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。