[G]amerz-Comunity This My Zetta Zone
Join this site
  •  Asrofi
  • Sat-Cyber
  • MaenCit | By Way Of Life
  • VHEE-ZONE

Affiliates

Posted by : Unknown Sabtu, 22 Juni 2013

Halo Sobat S-S, Kali Ini Admin Mau Share Cara Membuat Persentase pada Scroll diblog

Kalo mau lebih jelas lagi nih ss nya



1. Login Ke BLOGGER
2. Masuk ke Template > Edit HTML
3. Masukan CSS dibawah ini tepat diatas ]]></b:skin>

#scroll {
display: none;
position: fixed;
top: 0;
right: 20px;
z-index: 500;
padding: 3px 8px;
background-color: #a200e4;
color: #fff;
border-radius: 3px;
}
#scroll:after {
content: " ";
position: absolute;
top: 50%;
right: -8px;
height: 0;
width: 0;
margin-top: -4px;
border: 4px solid transparent;
border-left-color: #a200e4;
}

4. Taro kode dibawah ini tepat dibawah kode </head>

<div id='scroll'></div>5. Simpan JavaScript dibawah ini tepat diatas </body>


<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 - $('#scroll').height() / 2;
$('#scroll')
.css('top', distance)
.text(' (' + Math.round(progress * 100) + '%)')
.fadeIn(100);
if (scrollTimer !== null) {
clearTimeout(scrollTimer);
}
scrollTimer = setTimeout(function() {
$('#scroll').fadeOut();
}, 1500);
});
//]]>
</script>

6. Simpan Template

Semoga Trik ini bermanfaat ya .

HOVER GUE DONK ^_^
URL Code
Forum Code
HTML Code

13 Comments • Add Comment/Tambahkan Komentar

  1. Wah kodenya ada yang kurang sob :D, jika ingin copy artikel mohon cantumkan sumbernya sob :D, tolong hargailah artikel orang lain :v
    http://yoga-tc.blogspot.com/

    BalasHapus
  2. Nice Bang ^^ Izin Sedot lah....

    Komeng Suces http://katsu-false.blogspot.com

    BalasHapus
  3. blogwalking :)
    dedisinaga123.blogspot.com

    BalasHapus
  4. ijin coba sob ..

    visit balik ya ..
    [galih-cyber.blogspot.com]

    BalasHapus
  5. nyoba sob

    komen bek : http://vhee-zone.blogspot.com/

    BalasHapus
  6. kk kalo saya mau beli template ini berapa sob
    http://zynation-inc.blogspot.com/

    BalasHapus

Copyright © 2013 SkyStreet | Powered by Blogger | Created by Renadel Dapize | Design by Muhammad Aldi Haryojudanto | Original by Djogsz