Transparent background in the WebView in JavaFX

后端 未结 6 1953
后悔当初
后悔当初 2020-12-19 00:50

I need to show my webview content over parent background pattern. Is there a straightforward way to do it?

6条回答
  •  生来不讨喜
    2020-12-19 01:36

    If u have a bright background use

    webView.setBlendMode(BlendMode.DARKEN);
    

    and when dark background, then

    webView.setBlendMode(BlendMode.LIGHTEN);
    

    This will probably be fixed in some time, this feature is requested on the JavaFX bug tracker #RT-25004

提交回复
热议问题