Increase font size of whole web page on button click event using jquery

前端 未结 6 1964
说谎
说谎 2021-01-16 10:02

I want to increase font size in whole page when user click on increase button. It will be increase on bases of current font size. Following is sample code :

         


        
6条回答
  •  旧巷少年郎
    2021-01-16 10:40

    It's probably simplest to consider formatting your page for this functionality. E.g. use a fixed original body font-size, and have all elements use a font-size percentage. Then, you can simply use jQuery to set the body font-size, and all elements will adjust accordingly.

提交回复
热议问题