::Gedung Sekolah::
::Logo SMAPTeA::
::Taufik Hidayat::
Taufik Hidayat
BAHASA ARAB
SMAPTeA
ليس العيب ان يعمل المرء ويخطئ ولكن العيب ان يتكل على غيره فى عمله
Beranda
Profil
Identitas
Jabatan
Mapelku
SK KI KD
Silabus
RPP
KKM
Bank Soalku
PTS
PAS
PAT
Tugasku
Pokok
Tambahan
Coretanku
Galeriku
Photos
Videos
Sobatku
Downloadanku
Dokumen
Software
Jumat, 01 Juni 2018
HTML balik ke atas
<head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <style> body { font-family: Arial, Helvetica, sans-serif; font-size: 20px; } #myBtn { display: none; position: fixed; bottom: 20px; right: 30px; z-index: 99; font-size: 18px; border: none; outline: none; background-color: red; color: white; cursor: pointer; padding: 15px; border-radius: 4px; } #myBtn:hover { background-color: #555; } </style> <button onclick="topFunction()" id="myBtn" title="Go to top">Top</button> <div style="background-color:black;color:white;padding:30px"> Scroll Down</div> <div style="background-color:lightgrey;padding:30px 30px 2500px"> This example demonstrates how to create a "scroll to top" button that becomes visible when the user starts to scroll the page.</div> <script> // When the user scrolls down 20px from the top of the document, show the button window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("myBtn").style.display = "block"; } else { document.getElementById("myBtn").style.display = "none"; } } // When the user clicks on the button, scroll to the top of the document function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } </script>
Tidak ada komentar:
Posting Komentar
Posting Lebih Baru
Posting Lama
Beranda
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar