我在调整webview内容的大小时遇到了问题。目前,我在该计划中有以下代码。我正在使用awesomium:
public ClassroomGameWin ()
{
if ((!WebCore.IsRunning) && (!initialized1))
{
WebCore.Initialize(WebConfig.Default);
initialized1 = true;
}
InitializeComponent();
wSession = WebCore.CreateWebSession(new WebPreferences() { CustomCSS = "body { transform: scale(1.6,1.6);}" });
WebView newwindow = WebCore.CreateWebView(100, 100, wSession);
InitializeView(newwindow);
newwindow.Resize(300, 300);
this.FormClosing += new FormClosingEventHandler(ClassroomGameWin_FormClosing);
this.Load += new EventHandler(ClassroomGameWin_Load);
lock (lockObj)
{
forms.Add(this);
}
}
: : :
internal ClassroomGameWin(WebView newwindow)
{
InitializeComponent();
InitializeView( newwindow );
// We should immediately call a resize,
// after wrapping child views.
if (newwindow != null )
newwindow.Resize( 300, 300 );
}
这是我面临的问题: 内容不会延伸到网络表单大小
关注调整大小而不是HTML源代码是否有办法解决问题?