gpt4 book ai didi

c# - Winform WebBrowser 不显示 CSS

转载 作者:行者123 更新时间:2023-11-28 17:35:48 32 4
gpt4 key购买 nike

我正在尝试导航到 Flying Toasters在 Winform WebBrowser 控件中,但动画似乎卡在第一帧。我猜这是网络浏览器的兼容性问题,因为当我导航到其他网站时,它说“不再支持 IE7 和 IE8”。为什么会发生这种情况,有什么办法可以解决这个问题吗?

Frozen CSS

最佳答案

如果您不覆盖注册表中的 Feature Browser Emultate 设置,将使用 Internet Explorer 7 渲染。

对于您的用户(当前用户)仅使用此 key :

  • HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

对于计算机/服务器上的所有用户,请使用此 key :

  • 在 64 位应用程序上的 64 位应用程序或 32 位计算机上的 32 位应用程序:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

  • 在 64 位机器上的 32 位应用程序上:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

例如,如果您的可执行文件名为 flying_toaster.exe。您必须添加一个名为 flying_toaster.exe 且值为 11001DWORD 条目(以使用 Internet Exlporer 11 渲染)。

enter image description here

下面列出了完整的值列表(引用自 MSDN):

11001 (0x2AF9) Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the !DOCTYPE directive.

11000 (0x2AF8) IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11.

10001 (0x2711) Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.

10000 (0x02710) Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.

9999 (0x270F) Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

9000 (0x2328) Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9. Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.

8888 (0x22B8) Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

8000 (0x1F40) Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8 Important In Internet Explorer 10, Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.

7000 (0x1B58) Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control.

在这篇博文中阅读更多关于 "Web Browser Control – Specifying the IE Version" 的信息

另请查看 MSDN Documentation about Feature Controls.

关于c# - Winform WebBrowser 不显示 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25098375/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com