elevator.js 是一个 ” back to top ” 按钮,即点击 ” back to top ” 按钮即可缓慢的返回网页顶部。
示例:
<script> // Elevator script included on the page, already. window.onload = function() { var elevator = new Elevator({ mainAudio: '/src/to/audio.mp3', endAudio: '/src/to/end-audio.mp3' }); } // You can run the elevator, by calling. elevator.elevate(); </script>