Example #1-Create a div with both vertical and horizontal scroll bars:

<div style=”width:300px;height:100px;overflow:auto;”>some text</div>


Example #2-Create a div with either vertical or horizontal scroll bars but not both:

<div style=”width:300px;height:100px;overflow-x: hidden;overflow-y:scroll;overflow:-moz-scrollbars-vertical !important;”>some text</div>


Example #3-you want to have div with only horizontal scroll bars, you can write like this

<div style=”overflow-x:scroll ;overflow-y:hidden;overflow:-moz-scrollbars-horizontal !important;”>some text</div>


Example #4-you can define your css to hide anything that would be beyond the dimensions of div by writing like this

<div style=”width:400px;height:100px;overflow:hidden;”>some text</div>

arrow
arrow
    全站熱搜

    kingjoy1235 發表在 痞客邦 留言(0) 人氣()