Copy link to clipboard
Copied
I'm wondering if it's possible to change the standard white background outside the stage when publishing as a Canvas HTML5 doc?
Hi.
That's the body's background color. You can change its color using JavaScript or CSS.
Here are two ways of changing it using JS (you can place the code in the first frame of the main timeline):
document.body.style.backgroundColor = "red"; // any valid css color
// OR
document.body.style.backgroundColor = lib.properties.color; // if you want the body to have the same background color as the stage
If you want/need to change the color before your content loads, then you're gonna need to
...Copy link to clipboard
Copied
Hi.
That's the body's background color. You can change its color using JavaScript or CSS.
Here are two ways of changing it using JS (you can place the code in the first frame of the main timeline):
document.body.style.backgroundColor = "red"; // any valid css color
// OR
document.body.style.backgroundColor = lib.properties.color; // if you want the body to have the same background color as the stage
If you want/need to change the color before your content loads, then you're gonna need to use CSS and for this you have to either modify the published HTML file or use a publish template.
I hope this helps.
Regards,
JC