Cara Mudah Membuat Indikator Persen Saat Halaman Artikel di Scroll ke Bawah
![]() |
| Indikator saat scroll |
Cara Pertama
1. Di blog kamu di Blogger.
2. Masuk ke Tema - Klik samping Sesuaikan - Pilih Edit HTML
![]() |
| Edit HTML |
3. Letakkan kode dibawah ini diatas kode
]]></b:skin>#sepesergulir {display: none;position: fixed;top: 0;right: 20px;z-index:500;padding:3px 8px;background:rgb(1, 148, 60);color: #fff;border-radius:3px;}#sepesergulir:after{content: " ";position: absolute;top: 50%;right: -8px;height: 0;width: 0;margin-top: -4px;border: 4px solid transparent;border-left-color: rgb(1, 148, 60);}4. Letakkan kode di bawah ini di atas kode </body><script src='https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js'></script><script type='text/javascript'>//<![CDATA[var scrollTimer = null;$(window).scroll(function() {var viewportHeight = $(this).height(),scrollbarHeight = viewportHeight / $(document).height() * viewportHeight,progress = $(this).scrollTop() / ($(document).height() - viewportHeight),distance = progress * (viewportHeight - scrollbarHeight) + scrollbarHeight / 2 - $('#sepesergulir').height() / 2;$('#sepesergulir').css('top', distance).text(' (' + Math.round(progress * 100) + '%)').fadeIn(100);if (scrollTimer !== null) {clearTimeout(scrollTimer);}scrollTimer = setTimeout(function() {$('#sepesergulir').fadeOut();}, 1500);});//]]></script> <body><div id='sepesergulir'></div>Cara ke 2
2. Pilih menu Tata Letak ➜ Tambahkan Gadget 👉 HTML/JavaScript
![]() |
| HTML / JavaScript |
3. Masukan kode dibawah ini:
<style>#sepesergulir {display: none;position: fixed;top: 0;right: 20px;z-index:500;padding:3px 8px;background:rgb(1, 148, 60);color: #fff;border-radius:3px;}#sepesergulir:after{content: " ";position: absolute;top: 50%;right: -8px;height: 0;width: 0;margin-top: -4px;border: 4px solid transparent;border-left-color: rgb(1, 148, 60);}</style><script src='https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js'></script><script type='text/javascript'>//<![CDATA[var scrollTimer = null;$(window).scroll(function() {var viewportHeight = $(this).height(),scrollbarHeight = viewportHeight / $(document).height() * viewportHeight,progress = $(this).scrollTop() / ($(document).height() - viewportHeight),distance = progress * (viewportHeight - scrollbarHeight) + scrollbarHeight / 2 - $('#sepesergulir').height() / 2;$('#sepesergulir').css('top', distance).text(' (' + Math.round(progress * 100) + '%)').fadeIn(100);if (scrollTimer !== null) {clearTimeout(scrollTimer);}scrollTimer = setTimeout(function() {$('#sepesergulir').fadeOut();}, 1500);});//]]></script><div id='sepesergulir'></div>


































