c#webbrowser浏览器不支持div浮动

问题遇到的现象和发生背景

想要vs2017 home c#webbrowser支持div浮动flow,但在没有。如果在浏览器中,是可以的

问题相关代码,请勿粘贴截图
 <style  type = "text/css" >
 .div1{ width: 200px; height: 100px; background: red; float: left; }
 .div2{ width: 300px; height: 350px; background: yellow; }
 </style >
     <div  class = "div1" ></div >
     <div  class = "div2" ></div >
         
运行结果及报错内容

img

我的解答思路和尝试过的方法
我想要达到的结果

img

webbrowser用的ie7核心,有兼容性问题。

img


用csfsharp,或者WebKitBrowser.dll这些webkit内核的webbrowser
或者修改css内容,红块absolute定位。如果套别人网站无法修改css,需要更换组件。

img

<!doctype html>
<style type="text/css">
    .div1 {
        width: 200px;
        height: 100px;
        background: red;
        position:absolute
    }

    .div2 {
        width: 300px;
        height: 350px;
        background: yellow;
    }
</style>
<div class="div1"></div>
<div class="div2"></div>

有帮助麻烦点下【采纳该答案】