+ 3
CHANGE CSS FONT
How do I change the font in the middle of the game?
5 Respuestas
0
//Class:
document.querySelector(query).classList.add(class);
//Style:
document.querySelector(query).style.fontFamily = font;
+ 2
Thanks John Wells, how do I use the switch class?
+ 1
There are a few ways. You can modify the style completely in JavaScript or you can have two different classes and switch the class the elements use. Which would you rather use?
+ 1
Here is a sample that swaps the class after 3 seconds.
https://code.sololearn.com/WrZ8Zoq2N3cN/#html
+ 1
I’m kind of late but thanks. lol