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>

文章標籤
全站熱搜
創作者介紹
創作者 包爾伯 的頭像
包爾伯

<font color="#FF0000">人生過程精彩才是重點</font>

包爾伯 發表在 痞客邦 留言(0) 人氣(13,198)