那你是富婆吗 2021-07-30 09:24 采纳率: 60%
浏览 129
已结题

如何用flex布局输出5点骰子?

img
这12346都没问题了,但这个5点骰子我是没搞懂了,中间那个点怎么搞都下不来……

  • 写回答

2条回答 默认 最新

  • 你好!机器人 2021-07-30 09:55
    关注
    
    
    ```html
    <div class="box">
      <div class="row">
        <span class="item"></span>
        <span class="item"></span>
      </div>
      <div class="row">
        <span class="item"></span>
      </div>
      <div class="row">
         <span class="item"></span>
         <span class="item"></span>
      </div>
    </div>
    
    
    
    ```css
    .box {
      display: flex;
      flex-wrap: wrap;
    }
    
    .row{
      flex-basis: 100%;
      display:flex;
      justify-content: space-between;
    }
    .item{
        width:10px;
        height:10px;
        background: #f00;
    }
    .row:nth-child(2){
      justify-content: center;
    }
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 8月7日
  • 已采纳回答 7月30日
  • 创建了问题 7月30日