使用jquery获取div的高度(以厘米为单位)? [英] getting height of a div in centimeter using jquery?
本文介绍了使用jquery获取div的高度(以厘米为单位)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个div,我在其中动态添加数据,我想得到特定div的高度,以厘米为单位。因为我需要根据高度控制可以在div中显示的数据量。
I'm having a div , in which I am adding data dynamically, I want to get the height of the particular div in centimeter. Because I need to control the amount of data that can be displayed in that div based on the height.
推荐答案
1px = 0.02645833 cm;
或
1 cm = 37.795276px;
请参阅以下链接:
这篇关于使用jquery获取div的高度(以厘米为单位)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文