请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

微信小程序支持cas3的grid 布局吗?

正在回答 回答被采纳积分+3

1回答

7七月 2022-08-19 17:45:30

这个理论上应该可以用,可以自己尝试下,我没有在小程序里用过

0 回复 有任何疑惑可以回复我~
  • 提问者 oop001 #1
    <view class="container">
      <view class="item">1</view>
      <view class="item">2</view>
      <view class="item">3</view>
      <view class="item">4</view>
      <view class="item">5</view>
      <view class="item">6</view>
      <view class="item">7</view>
      <view class="item">8</view>
      <view class="item">9</view>
    </view>
    .container{
      display: grid;
      grid-template-rows: repeat(3,1fr);
      grid-template-columns: repeat(3,1fr);
      justify-content: space-evenly;
      align-items: center;
      row-gap: 1rpx;
      column-gap: 2rpx;
      width: 100%
    }
    .item{
      width: 100%;
      height: 100%;
      background:green;
      text-align: center;
      box-sizing: border-box;
      text-align: center;
      justify-self: center;
    }
    .item:nth-of-type(1){
        grid-area: 1/1/3/3 ;
    }
    尝试了下,是可以的
    回复 有任何疑惑可以回复我~ 2022-08-20 09:25:20
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号