移动端界面超出左右滚动问题?

移动端页面,页面宽度为100px,里面的内容为1000px,超出隐藏,却滚动不了,div怎么布局
最好给个小实例,布局有点不懂,麻烦了

            <ul class="content-right">
                <div class="data_title">
                    <li>最新</li>
                    <li>涨幅</li>
                    <li>最高</li>
                    <li>最低</li>
                    <li>总手</li>
                    <li>总额</li> 
                </div>
 
                <div class="data_content"  v-for="value in newdata" >
                        <li> {{ value.newbest }} </li>                    
                        <li> {{ value.rise }} </li>                    
                        <li> {{ value.height }} </li>                    
                        <li> {{ value.low }} </li>                    
                        <li> {{ value.zongs }} </li>                    
                        <li> {{ value.zonge }} </li>                    
                </div>
            
            </ul>
            
            
            
            
            
.content-right {
    font-size: 14px;
     width: 60%;
    overflow-x:scroll; 
    -webkit-overflow-scrolling:touch;
    
}
    .data_title {
    width: 300%;
    overflow: hidden;
    display: flex;
    display: -moz-box;  /* Firefox */ 
    display: -ms-flexbox;    /* IE10 */ 
    display: -webkit-box;    /* Safari */  
    display: -webkit-flex;    /* Chrome, WebKit */ 
    display: box;  
    display: flexbox;
    justify-content:space-around;
    border-bottom: 1px solid #e5e5e5;
    line-height: 30px;
    height: 30px;
}
.content-right li{
    text-align: center;
    flex-grow: 1;
}
.content_left_null{
    border-bottom: 1px solid #e5e5e5;
    height: 30px;
    line-height: 30px;
}
.bottom-null{
    padding: 24px;
}
.data_title li{
    position: relative;
}
.data_title li:after{
    content:"";
    border-right: 1px solid #e5e5e5;
    position: absolute;
    right: 0;
    height: 20px;
    top: 50%;
    -webkit-transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    transform: translate(-50%,-50%);
}
.data_content{
    width: 300%;
    overflow: hidden;
    display: flex;
    display: -moz-box;  /* Firefox */ 
    display: -ms-flexbox;    /* IE10 */ 
    display: -webkit-box;    /* Safari */  
    display: -webkit-flex;    /* Chrome, WebKit */ 
    display: box;  
    display: flexbox;
    justify-content: space-around;
    border-bottom: 1px solid #e5e5e5;
    line-height: 53px;
    height: 53px;
}
.data_content li{
    text-align: right;
    width: 100%;
    padding-right: 20px;
}
阅读 7.2k
3 个回答
overflow:hidden//超出隐藏,无法滚动。
overflow:scroll//内容会被修剪,但是浏览器会显示滚动条以便查看其余的内容。
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题