How to Design Scroll-bar for website | Sanwebcorner

How to Design Scroll-bar for website

You can able to design the scroll-bar using the css but it will works only chrome, the other browser did'nt support this css code, but you can able to archive this in other browsers using Javascript. Now we can see how to write the css code to design the scrollbar.

You can use the following css code to customize the scrollbar in chrome browser. Using the ::-webkit-scrollbar css properties you can create this.


Css code for create Scroll bar Design for chrome browser

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,255,0,1.0);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 25px rgba(0,255,0,1.0);
}

p{
line-height:95px;
}

Css with Html Code:

<html>
<head>
<title>Scrollbar</title>

<style>

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,255,0,1.0);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 25px rgba(0,255,0,1.0);
}

p{
line-height:85px;
}
</style>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sapien metus, vehicula vel metus vitae, vestibulum euismod risus. Nulla quis arcu elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce euismod nunc non diam egestas pretium. Ut malesuada tempus dolor, a luctus quam blandit ac. Aenean cursus varius felis, posuere commodo eros sodales eu. Morbi malesuada mattis sapien nec congue.</p>

<p>Pellentesque id efficitur erat, sed faucibus mauris. Phasellus at consectetur nunc. Morbi at elit et eros egestas interdum a id ante. Nunc pharetra elit vel ultricies euismod. Nam vel finibus massa. Nullam ultrices sodales odio, vel commodo nisi maximus eu. Mauris varius interdum gravida. Maecenas ut ornare ipsum, at tempor massa. Nam sollicitudin nisi sapien, vel porttitor sem euismod id. Fusce porta dolor in diam imperdiet, ac dictum massa viverra. Nunc quis elementum diam. Mauris ornare augue diam, eget aliquam nibh mollis ut. Cras non nibh velit.</p>

<p>Fusce tempor mi tellus, eget sodales diam ullamcorper id. Donec et tortor venenatis velit interdum hendrerit id at urna. Nulla iaculis justo quis arcu lacinia vestibulum. Quisque hendrerit gravida ornare. Sed turpis ante, maximus cursus lectus non, maximus sagittis eros. Duis id nisi accumsan tortor pellentesque viverra sit amet at lacus. Quisque congue sapien ut metus lacinia, eu aliquet leo maximus. Integer nibh nulla, elementum non justo eu, elementum bibendum mauris. Nunc ullamcorper interdum enim, dignissim commodo purus malesuada sit amet. Sed facilisis risus quam, id ultricies mauris vulputate sodales. Nulla suscipit nisl sed sem finibus bibendum. Nunc sit amet sapien sem.</p>

<p>In hac habitasse platea dictumst. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam scelerisque hendrerit pretium. Phasellus in velit vehicula, dictum purus et, euismod eros. Sed vitae venenatis arcu. Integer quis risus accumsan, dapibus nunc quis, egestas justo. In est turpis, auctor in tortor ut, eleifend pharetra metus. In ornare elit et mollis congue. Nam dignissim ligula sed lacus imperdiet varius. Proin non varius mauris.</p>

<p>Pellentesque eu dapibus augue. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cras vehicula dui non neque ultricies viverra. Proin neque velit, rutrum sed metus sit amet, vulputate efficitur mauris. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut dapibus tempus risus, id egestas nisi mattis hendrerit. Vestibulum pulvinar turpis vel leo pulvinar, faucibus egestas lacus vehicula. Nullam lorem lacus, porta eu nisl ut, tempor ornare enim. Donec dignissim euismod nisi sit amet luctus. Ut ac eros in leo molestie fermentum quis sit amet felis. Mauris accumsan sollicitudin eleifend. Sed eu quam a ipsum tristique mattis.</p>

</body>

Post a Comment

Labels

360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient hide menu Horizontal News ticker Hover Htm Html html dropdown html form html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript Jquery js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form Multi-Step-form mysql News ticker on hover change text to image our team page password generator password strength checker Photoshop PHP populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips Youtube