JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

flex中justify-content: center导致的子元素显示不完全解决

发布时间 2023-06-09 11:55:36作者: 我要找到我的全世界

多嵌入一层标签

.content {
    display: flex;
    height: 200px;
    
}

.parent {
    display: flex;
    justify-content: center;
    width: 800px;
    margin-left: 100px;
    border: 1px solid green;
    overflow: auto;
}

.flex-item {
    flex: 0 0 200px;
    width: 200px;
    height: 180px;
    border: 1px solid red;
}

<div class="parent">
    <div class="content">
        <div class="flex-item"></div>
        <div class="flex-item"></div>
    </div>
</div>

 

    本栏目推荐文章
  • Center-based 3D Object Detection and Tracking
  • 基于融合语义信息改进的内容推荐算法。Improved content recommendation algorithm integrating semantic information.
  • 用jQuery查找元素
  • 【算法】【线性表】【链表】删除排序链表中的重复元素 II
  • 【算法】【线性表】【链表】删除排序链表中的重复元素
  • 【灌水】假如奥运会奖牌是元素周期表
  • 01-HTML元素
  • css中什么是伪类和伪元素
  • 二分查找法与双指针移动元素
  • 在JavaScript中使用includes函数检查数组中是否包含某个元素
    justify-content 元素 content justify centerjustify-content元素content justify justify-content space-between元素display 布局justify-content space-between一行 justify-content center justify justify-items justify-self布局 justify-self center-based center-based detection tracking center isecure手册center平台
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们