5***@qq.com
5***@qq.com
  • 发布:2018-09-19 16:25
  • 更新:2018-09-19 17:53
  • 阅读:1585

scroll-x中的内容一直是排成一列,怎么能让他排成一排?

分类:uni-app
<template>  
    <scroll-view class="game-list-type-scroll" scroll-x>  
        <view class="game-list-type-button">角色扮演</view>  
        <view class="game-list-type-button">角色扮演</view>  
    </scroll-view>  
</template>  

<script>  
    export default {}  
</script>  

<style>  

    .game-list-type-scroll {  
        background-color: #F8F8F8;  
        width: 100%;  
        height: 50upx;  
    }  

    .game-list-type-button {  
        height: 30upx;  
        width: 150upx;  
        border-radius: 15upx;  
        border: 1upx solid #909399;  
        color: #909399;  
        margin-left: 20upx;  
    }  

    page {  
        display: flex;  
        flex-direction: column;  
        min-height: 100%;  
        background: #DCDFE6;  
    }  

    view {  
        display: flex;  
        background: #F8F8F8;  
        width: 100%;  
        font-size: 26upx;  
    }  
</style>

scroll-x中的内容一直是排成一列,怎么能让他排成一排?

2018-09-19 16:25 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com - 有德于我,我必尊之

我弱弱的问一句,那个upx单位是什么鬼?

5***@qq.com

5***@qq.com (作者)

upx 是 Uni-app 前两天刚刚新更新的单位,自适应屏幕的。

Trust

Trust - 少说废话

修改下标签的 display,view 默认会占满一行。

该问题目前已经被锁定, 无法添加新回复