1div.ex1 {
2 overflow: scroll;
3}
4
5div.ex2 {
6 overflow: hidden;
7}
8
9div.ex3 {
10 overflow: auto;
11}
12
13div.ex4 {
14 overflow: visible;
15}
1
2.any-class::-webkit-scrollbar {
3 width: 8px;
4}
5.any-class::-webkit-scrollbar-track {
6 background: #c1c0c0;
7}
8.any-class::-webkit-scrollbar-thumb {
9 background: #828282;
10}
11.any-class::-webkit-scrollbar-thumb:hover {
12 background: #555;
13}
14
1/* To solve overflow issue in IE,
2always use properties separately,
3do not use short hand */
4
5div {
6 overflow-x: hidden;
7 overflow-y: auto;
8}
1.my-div{
2 overflow: hidden;
3}
4.my-div-1{
5 overflow-x: hidden;/* Overflow from the div horizanlty will be hidden*/
6 overflow-y: hidden;/* Overflow from the div vertically will be hidden*/
7}
8.scroll-div{
9 height: 150px
10 overflow: scroll;
11 /* Add scrollbar to the div when its height exceded 150px*/
12 /* Can be used horizanlty or vertically according to your layout*/
13}
1/*
2Overflow Property in CSS Controls the overflow of one element over another
3*/
4
5// If we didn't want it to overflow we can just do this
6
7selector {
8 overflow: hidden;
9}