Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
285 views
in Technique[技术] by (71.8m points)

实现不定个数的li等宽自适应ul

image
想要实现如图的效果,li宽度相等,并且自适应ul的宽度。
li个数不是固定的,图中一行为9个li,当屏幕宽度变小,可能会8个或更少,但在屏幕宽度变化的过程中,要保持li的宽度相等并且始终充满ul的宽度。
应该怎么实现?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

grid 布局 或者 flex


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...