Any ideas on how I could implement a grid-view in CSS? - CSS

情到浓时终转凉″ 提交于 2019-12-17 19:52:50

问题


Here is an example grid-view:

Also another example from TED.com


Any ideas on how I could go on about implementing a dynamic grid like this in CSS?

I guess it might have something to do with dividing the box in units styled with float:left, and each unit would have a border if on a boxes border.

Help would be very appreciated =)


回答1:


I've achieved a similar grid in the past with David Desandro's awesome jQuery Masonry plugin. As that page illustrates, CSS floats aren't so great for grid layouts, and setting up "units" like you describe could be a massive headache, depending on the complexity of the grid and range of cell sizes.



来源:https://stackoverflow.com/questions/3379994/any-ideas-on-how-i-could-implement-a-grid-view-in-css-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!