Nwjs Resolve page transparency, display white screen on startup

Source: Internet
Author: User

These days in the NWJS is OK to access the outside network, you can see the official documents, otherwise really want to cry no tears, can't find the relevant documents can not solve the problem.
Mainly talk about how the page transparent, there is a white screen flash problem it.
Main tools:

Angularjs+node+nw.js to develop and transmit the way data is displayed

Official documents:

In the HTML page implementation:

<body style= "Background-color:rgba (0,0,0,0)" >

Implemented in the Package.json file

"Window": {

"Frame": false,
"Transparent": true
}
OK can be transparent, but is displayed when there is a flashing white screen, white screen on a flash, how to do

Continue to add files in Package.json
"Show": false

Fill in the following code into the app file:

var GUI = require (' Nw.gui ');
var win = GUI. Window.get ();

Win.show ();

The problem is solved, very happy ah.

Why is that so, I think:

Nwjs the height of the page, the width, whether the status bar and other information are placed in the Package.json File window object, the page changes need to be modified window properties.

First let the window not display, and then the onload when the window is displayed, onload is in the DOM and JS loaded when the display, so it will not be white screen.




Nwjs Resolve page transparency, display white screen on startup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.