网格布局子项尺寸问题
来源:9-6 缓存失效—Pinia 图书状态传递的 getters 缓存为何失效?

慕粉3946981
2023-07-24
justify-self: flex-start;影响了grid-template-columns设置的尺寸大小,这是什么原理?
写回答
1回答
-
网格布局内部规定:(1) 如果 div 没指定 width , 如只设置了 grid-template-columns ,justify-self 为 auto。(2) 当 justify-self 为 auto,div 的 width 会拉伸至 grid-template-columns 设置的宽度。(3) 当你设置了 justify-self 为 flex-start , flex-end等,div 的width由内容来定。
022023-07-25
相似问题