+ 3

CHANGE CSS FONT

How do I change the font in the middle of the game?

18th Jan 2018, 11:43 PM
YoBoi
5 Respuestas
0
//Class: document.querySelector(query).classList.add(class); //Style: document.querySelector(query).style.fontFamily = font;
22nd Jun 2019, 1:07 AM
YoBoi
+ 2
Thanks John Wells, how do I use the switch class?
19th Jan 2018, 1:18 AM
YoBoi
+ 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?
19th Jan 2018, 1:04 AM
John Wells
John Wells - avatar
+ 1
Here is a sample that swaps the class after 3 seconds. https://code.sololearn.com/WrZ8Zoq2N3cN/#html
19th Jan 2018, 4:25 AM
John Wells
John Wells - avatar
+ 1
I’m kind of late but thanks. lol
14th Jan 2019, 2:12 AM
YoBoi