Showing posts with label bar. Show all posts
Showing posts with label bar. Show all posts

Thursday, January 1, 2015

Do you want to enhance the Scroll bar of your website? Scroll bar appears at the right side of the screen and, it allows users to scroll down the page whenever they drag there mouse up or down the page. To provide a user-friendly experience to your visitors, it is essential to have a Smooth Scroll bar. However, there is no doubt that Custom Scroll bar does the job quite handsomely, but it is not perfect. Few days ago, our reader informed us about the colorful Webkit Scrollbars that he has seen on different websites. Furthermore, he also requested us to develop a similar one. Therefore, in this article we will learn How to Create Customize Webkit Scrollbar in Blogger BlogSpot Blog?

What is a Scrollbar?


A Scrollbar is a GUI (graphical control element) which controls elements like text, pictures, videos and anything else available on the webpage. In other simple words, it’s a long thing bar located at the right side of your screen by which an element can be scrolled with the help of a mouse.

scrollbarparts

[quote]::-webkit-scrollbar              { /* 1 */ }
::-webkit-scrollbar-button       { /* 2 */ }
::-webkit-scrollbar-track        { /* 3 */ }
::-webkit-scrollbar-track-piece  { /* 4 */ }
::-webkit-scrollbar-thumb        { /* 5 */ }
::-webkit-scrollbar-corner       { /* 6 */ }
::-webkit-resizer                { /* 7 */ }[/quote]

Why to Use Customized Scrollbar?


There is no lethal reason why a person could say a no to Customized Scrollbar because it adds a new elegant life to his website. Consider that a person has a highly professional website but since, the Scrollbar is from old-school, so it is quite clear that, it will destroy the complete outlook of a website. To learn more about the difference between an ordinary or and a customized scrollbar consider the following screenshot.

Ordinary-and-Custom-Scrollbar


How to Add Webkit Scrollbar in Blogger Platform?


To be honest, there is no complexity in this tutorial because all we need to do is to insert a CSS to our theme, and it would do the job quite effortlessly.  To install Webkit Scrollbar in your blogger template consider the following instructions.



  • Go To Blogger.com >> Templates >>EDIT HTML >> Proceed.

  • Now in the theme Search for ]]></b:skin> and above it Paste the Following CSS Coding.


/* --- MyBloggerWorld CUSTOM WEBKIT SCROLLBAR IN BLOGGER BLOG --- */
::-webkit-scrollbar {
background:#fff;
width:10px;
}
::-webkit-scrollbar-thumb {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
background-image: -webkit-linear-gradient(top, #336699 10%, #336699 51%);
}
::-webkit-scrollbar-track {
}


  • Then Replace #336699 with the color that you want to see in the Scrollbar.



Article from MyBloggerLab

Wednesday, December 31, 2014






In today’s post , i will explain that how you can add/show percentage value to scrollbar in blogger blog. actually it is not important for your blog, but this is for those who want to give unique effect to scroll-bar in their blog. it may be helpful for your readers to check that how much they have scrolled down or up or how much content left to be read.

Check the preview below and follow the steps, if you want to add this right to your blog.

Preview :

Untitled

How to add percentage value to scrollbar in blogger?


1. Go to blogger –> Tempalte –> Edit HTML

2. CTRL + F to find this : ]]></b:skin>

3. Copy and paste below code just above this : ]]></b:skin>
<style>
#scroll
{
display: none;
position: fixed;
top: 0;
right: 20px;
z-index: 500;
padding: 3px 8px;
background-color: #2187e7;
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: #2187e7;
}
</style>

 

4. Next search for </head>

5. Copy and paste below code just after </head>

[quote]<div id='scroll'></div>[/quote]

Make sure you pasted the code after </head> and before <body> like this :
</head>
<div id='scroll'></div>
<body>

 

6. Now, again search for </body>

7. Copy and paste below code just above </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>

 

8. Save template.

That’s it.