I am currently creating a site mainly using HTML and CSS.
As the title says, I don't know how to change the font with a single button.
I want to place a button like the image below and change the font of the whole body or text by clicking the button.
And I want to set it back to the original font with just one click.
I don't know much about js, so I don't know how to do it.
Thanks for your ideas and wisdom. Thank you.
Answer # 1
const element = document.getElementById ("ID where you want to change"); h1.style.fontFamily = "Font to change";
You can do this when you click this
- java - i want to change the screen when clicking a button in android studio
- xcode - [swift] change the button and font size appropriately depending on the simulator model
- c# - button color does not change in form application
- vuejs i want to change the color of the selected button
- i want to change the contents by clicking a cell in table of python gui
- python - i want to change the notation of the button when i check the check box