Browse Source

add usecase top

huai-sian 3 years ago
parent
commit
747df381ba
1 changed files with 7 additions and 1 deletions
  1. 7 1
      usecases.html

+ 7 - 1
usecases.html

@@ -125,7 +125,8 @@
                 </div>
       </div>
     </section>
-
+    <img id='gotop' class="btn-gotop" width="50" data-gt-target="#top" data-gt-duration="500" data-gt-offset="0" src="./img/go-up.png"
+    alt="">
     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
         integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
         crossorigin="anonymous"></script>
@@ -146,6 +147,11 @@
         $('#exampleModal').on('hidden.bs.modal', function () {
           $('.youtube-video').attr('src', ``);
         });
+        $('.btn-gotop').click(function () {
+            $('html, body').animate({
+                scrollTop: 0
+            }, 500)
+        });
     </script>
 </body>