开发者

How to convert a fixed height/width-fixed layout to elastic?

I used the same software used here http://us.gn.bartal.org/ to create a fixed width/height 开发者_如何学编程treemap in HTML + CSS.

I would like to make it elastic by having a JavaScript function to convert all pixels absolute positions and sizes to percentages.

How would you suggest to proceed? Is there some jQuery/Prototype/Dojo magic that I can exploit?


Your basic process would be something like this:

  • Identify the elements that need resizing
  • Write some JQuery to find the sizes of those elements
  • Calculate the percentages (or other values)
  • Make the adjustments
  • Subscribe to all relevant resize events
  • Recalculate the sizes on each resize event
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜