Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含许多行的文本区域,我想添加一个滚动条并只显示前 3 行如何执行此操作?
任何人都可以帮助我吗?我整晚都在尝试让它工作,但它未能显示垂直线,它只显示 2 个箭头而无法滚动。
这就是我试图做的
<div style="width:=100%;height:50%; overflow:scroll; overflow-x:hidden;"> <?php print "$blabdisplaylist"; ?> </div>
<div style='overflow-y:scroll; overflow-x:hidden;height 3em;'></div>
您无法设置overflow-xtohidden和overflowto,scroll因为它们相互冲突。
overflow-x
hidden
overflow
scroll
<div style="width:100%;height:3em;overflow:auto"> Content </div>
奖励:3em将高度设置为三行高。
3em