我已经看过Flash中的图形和基本适应浏览器大小或它们内部灵活元素的内容......我对raphaelJS并不太熟悉但你能做到这一点,如果是这样,如果是这样,怎么样?
在raphaeljs中,您可以在Raphael对象上调用.setSize来更新其大小.要适应浏览器窗口大小的运行时更改,您可以响应窗口大小调整事件.使用jQuery,您可以:
// initialize Raphael object
var w = $(window).width(),
h = $(window).height();
var paper = Raphael($("#my_element").get(0), w,h);
$(window).resize(function(){
w = $(window).width();
h = $(window).height();
paper.setSize(w,h);
redraw_element(); // code to handle re-drawing, if necessary
});