File tree Expand file tree Collapse file tree 3 files changed +118
-0
lines changed Expand file tree Collapse file tree 3 files changed +118
-0
lines changed Original file line number Diff line number Diff line change 107
107
border-bottom: 0 solid transparent;
108
108
}
109
109
110
+ /* Style for the "Back to Top" button */
111
+ #myBtn {
112
+ display: none;
113
+ position: fixed;
114
+ bottom: 20px;
115
+ right: 30px;
116
+ z-index: 99;
117
+ font-size: 18px;
118
+ border: none;
119
+ outline: none;
120
+ background-color: red;
121
+ color: white;
122
+ cursor: pointer;
123
+ padding: 15px;
124
+ border-radius: 4px;
125
+ }
126
+
127
+ #myBtn:hover {
128
+ background-color: #555;
129
+ }
110
130
/*
111
131
* Lumino
112
132
*/
@@ -9534,11 +9554,36 @@ <h2 id="Reference">Reference<a class="anchor-link" href="#Reference">¶</a></h2>
9534
9554
9535
9555
</main>
9536
9556
<button class="back-button" onclick="goBack()">Back to Previous Page</button>
9557
+ <button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
9558
+
9537
9559
9538
9560
<script>
9539
9561
function goBack() {
9540
9562
window.history.back();
9541
9563
}
9542
9564
</script>
9565
+
9566
+ <script>
9567
+ // Get the button
9568
+ let mybutton = document.getElementById("myBtn");
9569
+
9570
+ // When the user scrolls down 20px from the top of the document, show the button
9571
+ window.onscroll = function() {scrollFunction()};
9572
+
9573
+ function scrollFunction() {
9574
+ if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
9575
+ mybutton.style.display = "block";
9576
+ } else {
9577
+ mybutton.style.display = "none";
9578
+ }
9579
+ }
9580
+
9581
+ // When the user clicks on the button, scroll to the top of the document
9582
+ function topFunction() {
9583
+ document.body.scrollTop = 0;
9584
+ document.documentElement.scrollTop = 0;
9585
+ }
9586
+ </script>
9587
+
9543
9588
</body>
9544
9589
</html>
Original file line number Diff line number Diff line change 1374
1374
flex: 1 1 auto;
1375
1375
}
1376
1376
1377
+ /* Style for the "Back to Top" button */
1378
+ #myBtn {
1379
+ display: none;
1380
+ position: fixed;
1381
+ bottom: 20px;
1382
+ right: 30px;
1383
+ z-index: 99;
1384
+ font-size: 18px;
1385
+ border: none;
1386
+ outline: none;
1387
+ background-color: red;
1388
+ color: white;
1389
+ cursor: pointer;
1390
+ padding: 15px;
1391
+ border-radius: 4px;
1392
+ }
1393
+
1394
+ #myBtn:hover {
1395
+ background-color: #555;
1396
+ }
1397
+
1377
1398
/*-----------------------------------------------------------------------------
1378
1399
| Copyright (c) Jupyter Development Team.
1379
1400
| Distributed under the terms of the Modified BSD License.
@@ -7998,5 +8019,36 @@ <h4 id="Consulsion:">Consulsion:<a class="anchor-link" href="#Consulsion:">¶</a
7998
8019
</div>
7999
8020
</div>
8000
8021
</main>
8022
+ <button class="back-button" onclick="goBack()">Back to Previous Page</button>
8023
+ <button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
8024
+
8025
+
8026
+ <script>
8027
+ function goBack() {
8028
+ window.history.back();
8029
+ }
8030
+ </script>
8031
+
8032
+ <script>
8033
+ // Get the button
8034
+ let mybutton = document.getElementById("myBtn");
8035
+
8036
+ // When the user scrolls down 20px from the top of the document, show the button
8037
+ window.onscroll = function() {scrollFunction()};
8038
+
8039
+ function scrollFunction() {
8040
+ if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
8041
+ mybutton.style.display = "block";
8042
+ } else {
8043
+ mybutton.style.display = "none";
8044
+ }
8045
+ }
8046
+
8047
+ // When the user clicks on the button, scroll to the top of the document
8048
+ function topFunction() {
8049
+ document.body.scrollTop = 0;
8050
+ document.documentElement.scrollTop = 0;
8051
+ }
8052
+ </script>
8001
8053
</body>
8002
8054
</html>
Original file line number Diff line number Diff line change @@ -416,4 +416,25 @@ td:first-child {
416
416
}
417
417
.back-button : hover {
418
418
background-color : # 0056b3 ;
419
+ }
420
+
421
+ /* Style for the "Back to Top" button */
422
+ # myBtn {
423
+ display : none;
424
+ position : fixed;
425
+ bottom : 20px ;
426
+ right : 30px ;
427
+ z-index : 99 ;
428
+ font-size : 18px ;
429
+ border : none;
430
+ outline : none;
431
+ background-color : red;
432
+ color : white;
433
+ cursor : pointer;
434
+ padding : 15px ;
435
+ border-radius : 4px ;
436
+ }
437
+
438
+ # myBtn : hover {
439
+ background-color : # 555 ;
419
440
}
You can’t perform that action at this time.
0 commit comments