我的滚动div在PC上起作用,但在移动设备上不起作用

问题描述 投票:0回答:1

我正在尝试制作social networking site。为了显示评论,我做了两个div。这是它们的css代码:

#bigbox{ 
float:right; 
background:white; 
width:45%; 
height:450px; 
border-left: 5px solid #4CAF50;
}



#rightbox{ 
float:right; 
background:white; 
width:95%; 
height:100%;
overflow: scroll;
-webkit-overflow-scrolling: touch;
padding: 15px;
}

我在rightbox内使用bigbox div。

在PC上,没有问题,但在移动设备上,当评论溢出时,它们会遍历整个网站。

如果您需要登录,这里是测试用户:

用户名:test密码:test123

我在PC上使用Firefox和Chromium进行测试,在移动设备上使用Chrome,Opera,DuckDuckGo和Firefox进行测试。

android html css mobile-browser
1个回答
0
投票

只需使用flex

.postcontainer {display: flex; flex-direction:column;}
© www.soinside.com 2019 - 2024. All rights reserved.