How can I get the font size of an element as it was set by css

后端 未结 4 1668
慢半拍i
慢半拍i 2020-12-09 20:10

I\'m writing a simple jQuery that to change the font size of an element by a certain percentage. The problem I\'m having is that when I get the size with jQuery\'s $(\'#el\'

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 20:56

    This jQuery plugin looks like it will do the trick:

    Update: jQuery Plugin for Retaining Scalable Interfaces with Pixel-to-Em Conversion

    Github: jQuery-Pixel-Em-Converter

提交回复
热议问题