我试图将滚动条的宽度设置为“薄”和“无”,但它们都不起作用。我也尝试过使用 -webkit- 注意:我已将溢出设置为“自动”,是不是滚动条宽度属性不起作用?
以下是我的 HTML:
<div class="chat__chatting">
<div class="chat__scrollable-chat">
<div class="chat__chatting__header">
<div class="chat__chatting__header--img">
<img src="../../assets/person.png" />
</div>
<div class="chat__chatting__header--descr">
<div class="chat__chatting__header--name">Alexender</div>
<div class="chat__chatting__header--location">Birmingham, United Kingdom</div>
<div class="chat__chatting__header--age">Age 24</div>
</div>
</div>
<div class="chat__chatting__body">
<div class="chat__chatting__body--rcv-msg">
<div class="chat__chatting__body--rcv-msg--img">
<img src="../../assets/person.png" />
</div>
<div class="chat__chatting__body--rcv-msg---text">How are you?</div>
</div>
<div class="chat__chatting__body--sent-msg">
<div class="chat__chatting__body--sent-msg--img">
<img src="../../assets/person.png" />
</div>
<div class="chat__chatting__body--sent-msg---text">I'm fine</div>
</div>
</div>
</div>
<div class="chat__chatting__footer">
<textarea rows="1" class="chat__chatting__footer--textfield"></textarea>
<div class="chat__chatting__footer--send-btn">
<img src="../../assets/send.svg" />
</div>
</div>
</div>
和 SCSS:
.chat{
&__scrollable-chat {
overflow-y: auto;
flex-grow: 1;
scrollbar-width: none;
}
&__chatting {
border-radius: 4px;
flex: 3;
height: 100%;
background-color: #fff;
display: flex;
flex-flow: column;
flex-grow: 3;
&__header {
display: flex;
flex-direction: row;
}
}
有人可以想出一个可能的解决方案吗?
海绵宝宝撒
千万里不及你
相关分类