我有以下代码jsbin。当消息溢出包装器时,是否可以进行垂直滚动?谢谢!
答案 0 :(得分:5)
用这个css demo
替换你的css#wrapper {
position: relative;
height: 400px;
border: 1px solid #AAA;
margin-bottom: 20px;
}
#list {
position: absolute;
bottom: 0;
width: 100%;
max-height:100%;
overflow-y: auto;
}
.message {
background-color: orange;
padding: 10px;
border-bottom: 1px solid red;
}