【问题标题】:C# WebBrowser, setting opacity of divC# WebBrowser,设置div的不透明度
【发布时间】:2013-11-09 05:22:44
【问题描述】:

我在我的 C# 应用程序中使用 WebBrowser 来显示我的网页。我有一个使用标准 rgba 设置为半透明的 div:

background-color:rgba(255,0,255,0.5);

它在 Firefox 和我的 IE 10 中运行良好,但没有出现在我的 C# WebBrowser 中。

有没有办法解决这个问题并为 C# WebBrowser 制作半透明背景?

【问题讨论】:

    标签: c# html browser opacity


    【解决方案1】:

    也许可以试试:

    background-color: #ff00ff;
    filter:alpha(opacity=50);
    opacity: .5;
    

    这个问题可能有一些见解(阅读所有答案/cmets) How do I give text or an image a transparent background using CSS?

    【讨论】:

      【解决方案2】:

      AwesomiumAwesomium.NET 是支持该功能的 HTML UI 引擎。

      检查 WPF WebControl。您可以将WebControl.IsTransparent 设置为true,并使用body { background-color: transparent; } 加载一些内容(您甚至可以使用WebSession 指定要应用于所有加载页面的自定义CSS)。

      来自 Perikles C. Stephanidis

      【讨论】:

        猜你喜欢
        • 2013-01-29
        • 2010-10-18
        • 2012-01-26
        • 2011-07-05
        • 2016-05-15
        • 1970-01-01
        • 2019-07-01
        • 1970-01-01
        • 2012-08-06
        相关资源
        最近更新 更多