Distribute elements evenly using CSS

后端 未结 13 829
一生所求
一生所求 2020-12-09 02:55

A method to distribute elements evenly in a container using CSS appeared on Smashing Magazine today.

I recently had to use Javascript to achieve the same effect for

13条回答
  •  抹茶落季
    2020-12-09 03:20

    Demo - http://codepen.io/vsync/pen/tFwxu

    all you need if to make the list itself text-align:justify and then add some pseudo item top the end of it and make it fill all the width, to trick the list into justifying all it's items across it's total width.

提交回复
热议问题