我创建了这个 html 文件,其中使用 ajax 请求加载数据,但有一个尴尬的问题。它没有在任何浏览器中向我显示垂直滚动。
html
<div id="register1">
<h2><center>Live Conversation</center></h2>
<div id="showall">
//data is loaded here using ajax request
</div>
<div id="white">
<center>
<textarea rows="5" cols="97" id="writebody"></textarea>
</center>
<br> // $msg is already set in my file
<input type="button" name="enterbody" value="send" id="enterbody<?php echo $msg; ?>">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
#register1 {
background: #f0f0f0;
color: black;
margin-left: auto;
margin-right: auto;
width: 800px;
margin-top: 100px
}
#white {
background: white;
height: auto
}
Run Code Online (Sandbox Code Playgroud)
可能是什么问题。
设置结果容器的高度#showall
#showall {
height: 400px;
overflow: auto;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15275 次 |
| 最近记录: |