获取jquery以点数返回font-size [英] get jquery to return font-size in points
本文介绍了获取jquery以点数返回font-size的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在jquery中使用.css('font-size')时,它返回以像素为单位的值,有没有办法让它以分数形式给出它?这是因为我想在php gd中使用它,它需要字体大小为点
when I use .css('font-size') in jquery, it returns the value in pixels, is there any way to making it to give it in points ? it's because I want to use it in php gd, and it requires the font size to be in points
推荐答案
试试这个:
var fontSize = ...
var points = parseInt(fontSize) * 72 / 96
这篇关于获取jquery以点数返回font-size的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文