grid-template-rows: Repeat(auto-fill, 80px) 可以与 grid-auto-rows: 80px 互换使用吗?
P粉823268006
P粉823268006 2023-09-12 21:10:45
[CSS3讨论组]

我希望网格在添加动态内容时根据需要添加更多行。

这就能解决问题:

.grid {
  display: grid;
  grid-template-rows: 80px;
  grid-auto-rows: 80px;
//  grid-template-rows: repeat(auto-fill, 80px);
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  grid-gap: 60px 60px;
}

我想知道是否可以使用grid-template-rows:repeat(auto-fill, 80px);来代替grid-auto-rows: 80px

P粉823268006
P粉823268006

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号