一个页面是否可以存在多个竖滚动条

有没有办法可以让一个页面中有多个滚动条?
比如内容过多时,页面最右侧会有一个滚动条(系统给的),
自己可以不可以在某个位置的div设置滚动条? 当div中内容超出,就显示,否则隐藏?

呼啦一阵风
浏览 385回答 1
1回答

ITMISS

可以啊:!DOCTYPE html><html><head>&nbsp; &nbsp; <meta charset="UTF-8">&nbsp; &nbsp; <title></title>&nbsp; &nbsp; <style type="text/css">&nbsp; &nbsp; &nbsp; &nbsp; .box{width:200px;overflow:hidden;}&nbsp; &nbsp; &nbsp; &nbsp; .box .a{overflow-x: auto;}&nbsp; &nbsp; </style></head><body>&nbsp; &nbsp; <div class="box">&nbsp; &nbsp; &nbsp; &nbsp; <div class="a">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&nbsp; &nbsp; &nbsp; &nbsp; </div>&nbsp; &nbsp; </div></body></html>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript