WPF CefSharp.Wpf 窗体透明

WPF CefSharp.Wpf 窗体透明

一、窗体透明

1、允许窗体透明

<Window WindowStyle="None" WindowState="Normal" AllowsTransparency="True"/>

  

2、设置窗体透明

<Window.Background>
    <SolidColorBrush Opacity="0"></SolidColorBrush>
</Window.Background>

  

二、CefSharp.Wpf 设置网页透明

html, body {
    margin: 0px;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0);
}

  

三、加载本地HTML

WebBrowser.Address = AppDomain.CurrentDomain.BaseDirectory + @"HTMLDocumentWithScript.html";

  

上一篇:CS231N课程学习小结(assignment1)


下一篇:数组的默认值