簡體   English   中英

如何在YUI3中獲得計算的元素寬度和高度?

[英]How to get calculated element width and height in YUI3?

jQuery有方便的.height()和.width()實用程序來計算DOM元素的顯示大小。 它還有.position()來獲取坐標。 YUI3 Node中 ,我看到有.getX(),. getY()和.getXY()實用程序來獲取位置,但我沒有看到任何大小(或看不到)。

在YUI3中獲取元素高度和寬度的好方法是什么?

的getComputedStyle

.getComputedStyle("width")
.getComputedStyle("height")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM