我正在使用Bootstrap構建應用程序。使用CSS阻止頁面滾動
面板自動增長,因此用戶必須向下滾動瀏覽器窗口,我不希望發生這種情況。
這裏是如何看的那一刻:
我想聊天面板是瀏覽器的完整高度,讓輸入框和發送按鈕在瀏覽器的底部,我希望用戶列表只能增長到當前的瀏覽器窗口大小,然後在其內部進行滾動。
是否有可能使用CSS?
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<strong>Room:</strong> <span id="channel"></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Chat</h3>
</div>
<div class="panel-body">
<ul id="messages"></ul>
<form id="chat">
<div class="input-group">
<input type="text" class="form-control" id="chat-input" />
<span class="input-group-btn">
<button type="button" class="btn btn-primary">Send</button>
</span>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-2">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Users</h3>
</div>
<div class="panel-body">
<div class="list-group" id="users"></div>
</div>
</div>
</div>
</div>
</div>
'bottom:0'? ... – YOU
'overflow-y'?顯示代碼? – hjpotter92
@Jack,它適合你嗎? –