CSS3 > Scrollbar

Scrollbar in CSS3

How to work with scroll bar in CSS3?


Scrollbar

It is used to scroll the text,if the content is more than the alloted space then the scroll function is used to scroll the text. CSS provides a property called overflow which tells the browser what to do if the box's contents is larger than the box itself. This property can take one of the following values 

The syntax of the scroll function is 

  • overflow:scroll;
  • overflow:hidden;
 <p><i>Scroll bar</i></p>
    <div style="overflow:scroll;width:200px;height:100px;color:white;background-color:lightgreen">TechFunda is a free How to web technologies tutorials website. Enjoy your learning in How to manner that are based on real time problem solutions. If you have a how to problem to ask, please ask here.</div>
    <div style="overflow:hidden;width:150px;height:50px;color:red;background-color:black;">Have a .NET related question or topic to discuss? Write a Post and get responses from community members. You can also respond to the existing posts and win monthly prizes as well as gain community credit points.</div>

In the above code snippet we have scrollbar function which scrolls the text, in ordr to use the scrollbar we use the function over flow:scrollbar; which scrolls the text, overflow:hidden; It does not add the scroll function

output

 Views: 3669 | Post Order: 123



Write for us






Hosting Recommendations