本文实例讲述了requireJS模块化实现返回顶部功能的方法。分享给大家供大家参考,具体如下:
引用requireJs
html部分
Meta charset="UTF-8">
@H_403_13@
body{padding: 0; margin: 0; height: 3000px}
.btn{width: 80px; height: 80px;
position: fixed; bottom: 0; left: 50%; background: #ddd}