dqroc48068 2013-02-14 10:13
浏览 36
已采纳

如何重新排序内联块元素列表以填充所有空白区域?

I need to reorder a list of elements with the attribute display: inline-block and with not defined width for fill all empty space.

You can understand what I mean with this example:

http://jsbin.com/ozuxip/1/edit

As you can see, in the first list, near "Not so long text" there is lot of white space, and in the second list that space is filled with two elements enough short for fill the space. I need to automatize it.

In this example you can see with a red rectangle what is the "white space" http://jsbin.com/ozuxip/7/edit

I can use PHP, jQuery, CSS etc. Do you have some advice?

  • 写回答

2条回答 默认 最新

  • dqv84329 2013-02-15 22:06
    关注

    If I understood your question properly, you basically want elements of different widths to create some kind of neat grid. If so, you could try using Isotope plugin: http://isotope.metafizzy.co/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏