How can i get default font size in pixels by using JavaScript or JQuery?

前端 未结 9 1693
Happy的楠姐
Happy的楠姐 2021-02-04 09:07

As you know em is a relative font measurement where one em is equal to the height of the letter \"M\" in the default font size. An advantage in using it is because you will be a

9条回答
  •  我寻月下人不归
    2021-02-04 09:57

    Although it seems like getting the default font size might be a good idea -- if it's to set the layout of your pages and such, it's probably a safer practice to just let the user handle that.

    If they have their font size larger - it's because they're blind and vice versa. I'd recommend setting your defaults and 'recommending' a resolution/size. Unless your app depends on it -- let the user handle it.

提交回复
热议问题