<div class="chat-space">
<ol id="chat" class="discussion">
<!-- Chat messages get added here -->
</ol>
<div id="chat-box">
<input id="message"></input>
<button onclick="sendMessage()">Send</button>
</div>
</div>
我怎么能有chat-box div
到chat-space div
在任何时候的底部和中心,以及底部的chat-space div
变为滚动聊天邮件到达时,我希望能够滚动浏览input
粘贴到底部的消息。中心对齐div来滚动DIV
这是chat-space
DIV CSS代码:
.chat-space {
background-color: #4B6B8B;
overflow-y: auto;
width: 300px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
}
我试过这个,当我向上滚动输入框滚动起来为好,它不会停留在底部... – sachalondon
你能否更新演示并显示问题出在哪里? – Stickers
我更新了它http://jsfiddle.net/9wuyzznL/3/ – sachalondon