Getting the height of a div

前端 未结 4 402
别跟我提以往
别跟我提以往 2021-01-03 07:30
test | test | test
4条回答
  •  [愿得一人]
    2021-01-03 07:48

    Hm. I am not sure wither I’ve got your issue right or not but… From pure javascript you can use clientHeight (or offsetHeight) property of the element to get it’s height in pixels. From jquery just use .height() method (wich is actually a browser-agnostic wrapper around clientHeight property).

提交回复
热议问题