【发布时间】:2013-05-18 07:59:43
【问题描述】:
我有固定宽度的 div。如果 div 的内容大于 div 宽度,我想自动滚动(左和右:水平方向)文本。我怎么能想到 css 或 jquery。目前 div 有一个类像这样..
.divcon{
margin:0px;
padding:0px;
height:30px;
width:143px;
font:bold 9px Verdana, Geneva, sans-serif;
line-height:30px;
color:#000;
background-image:url(../images/glass_bg.png);
background-repeat:repeat-x;
display:block;
float:left;
}
我不需要任何滚动条..我希望它像选框一样的功能
【问题讨论】:
-
试试:
overflow-x: auto;或overflow-x: scroll;
标签: javascript jquery css html scroll