diff --git a/public/static/index/default/css/common.css b/public/static/index/default/css/common.css index 80ed0a13e185f3365afdc007106b04986ce208e3..1486abcb9f1f7a6de251de3ee2fc0bef39bda0a1 100755 --- a/public/static/index/default/css/common.css +++ b/public/static/index/default/css/common.css @@ -747,4 +747,14 @@ button { outline: none !important; } .common-cropper-popup .preview-sm { margin:0 0 5px 8px; } .common-cropper-popup .preview-md { width:90px; height:90px; } .common-cropper-popup .preview-sm { width:50px; height:50px; } +} + + +/** + * 回到顶部 + */ +#my-go-top { + position: fixed; + right: 50px; + bottom: 100px; } \ No newline at end of file diff --git a/public/static/index/default/js/common.js b/public/static/index/default/js/common.js index aeb97053b743c8e56dcce23ca0ec53580e38e3c3..af5debeacd59954cba6de7a72694f1c914eb21ea 100755 --- a/public/static/index/default/js/common.js +++ b/public/static/index/default/js/common.js @@ -2,6 +2,17 @@ console.log("%c\u5b89\u5168\u8b66\u544a\uff01","font-size:50px;color:red;-webkit console.log("%c\u6b64\u6d4f\u89c8\u5668\u529f\u80fd\u4e13\u4f9b\u5f00\u53d1\u8005\u4f7f\u7528\u3002\u8bf7\u4e0d\u8981\u5728\u6b64\u7c98\u8d34\u6267\u884c\u4efb\u4f55\u5185\u5bb9\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u60a8\u7684\u8d26\u6237\u53d7\u5230\u653b\u51fb\uff0c\u7ed9\u60a8\u5e26\u6765\u635f\u5931 \uff01","font-size: 20px;color:#333"); console.log("\u6280\u672f\u652f\u6301\uff1a\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0068\u006f\u0070\u0078\u006f\u002e\u006e\u0065\u0074\u002f"); +// 回顶部监测 +$(window).scroll(function() +{ + if($(window).scrollTop() > 100) + { + $("#my-go-top").fadeIn(1000); + } else { + $("#my-go-top").fadeOut(1000); + } +}); + var store = $.AMUI.store; if(!store.enabled) {