【问题标题】:gridster auto height and width according to contentgridster 根据内容自动高度和宽度
【发布时间】:2014-12-09 17:02:18
【问题描述】:

我正在使用 Gridster 的“add_widget”方法添加网格。小部件添加成功,但无序列表 (ul) 宽度小于其内容。

谁能告诉我如何根据内容调整 Gridster 中的高度和宽度。

【问题讨论】:

  • 您找到解决方案了吗?我也有同样的问题...
  • 你不能使用'resize_widget'方法吗?您也许可以使用它并根据包含的元素尺寸提供宽度/高度。即 $(element).parent().width() 或 .height() 并将小部件调整为那些?
  • OP,有这方面的消息吗?

标签: javascript jquery gridview gridster


【解决方案1】:

几年前我做的一件事是通过 javascript 重新创建样式,然后用新样式替换旧样式。您还需要设置 {autogenerate_stylesheet_opt: false}。希望这会有所帮助!

参考:http://gridster.net/#autogenerate_stylesheet_opt

【讨论】:

  • 您的链接已损坏
  • 是的,我认为图书馆已经不存在了。我会改用 David Desandro 的 packery 库。 packery.metafizzy.co
猜你喜欢
  • 2015-09-23
  • 1970-01-01
  • 2014-09-29
  • 2013-11-22
  • 1970-01-01
  • 2013-02-07
  • 1970-01-01
  • 2011-08-07
  • 1970-01-01
相关资源
最近更新 更多