计算font size 时,要考虑是否用$(ele).css("fontSize") ,还是 window.getComputedStyle($(ele).get(0),null).fontSize;

因为$(ele).css("fontSize")  给的值是有可能为rem,em等情况的,所有,要得到准确值的话,选择window.getComputedStyle($(ele).get(0),null).fontSize;

相关文章:

  • 2022-12-23
  • 2021-04-11
  • 2022-01-08
  • 2021-09-19
  • 2021-09-03
  • 2021-12-06
  • 2021-09-29
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2022-01-01
  • 2021-06-15
  • 2022-12-23
  • 2021-05-16
  • 2021-06-03
  • 2022-12-23
相关资源
相似解决方案