How to change background color?

Mr.Dot
23 Mar 2021, 18:11

How to change background color? Also, please tell me if the background can change colors multiple times! Thanks!


shenry
24 Mar 2021, 00:23

Yes it can.

$("body").css("background-color", "rgba(0, 0, 0, 0.8)");
$("body").css("color", "yellow");

Make sure you have 4 spaces before each of those lines.


IFforClassroom
24 Mar 2021, 01:02

Shenry, sweet! I've always just changed it in the css file. This is so convenient! You are a rockstar!


Bluevoss
24 Mar 2021, 02:05

See my post in your other question - it will allow background colors to be changed.


Mr.Dot
24 Mar 2021, 15:04

Wait that only changes the text color not the background


shenry
24 Mar 2021, 16:46

If you are using the OFFLINE Editor the background colors dont change in the editor. You have to hit "build" to see the real product.

If you are using the ONLINE editor hit "preview" not "run" to see the real product.