JavaScript (Chrome) では、要素 (この場合は画像) の高さを取得します。
var computedStyle = window.getComputedStyle(img_element).getPropertyValue("height")
これが「自動」の場合、この値をpxで取得する簡単な方法はありますか? それはその親と同じでしょうか?
JavaScript (Chrome) では、要素 (この場合は画像) の高さを取得します。
var computedStyle = window.getComputedStyle(img_element).getPropertyValue("height")
これが「自動」の場合、この値をpxで取得する簡単な方法はありますか? それはその親と同じでしょうか?