10 lines
236 B
JavaScript
10 lines
236 B
JavaScript
function getHeight(elem) {
|
|
return elem.getBoundingClientRect().height + 'px';
|
|
}
|
|
|
|
function makeHeightMatchInlineBox(block, inline) {
|
|
var height = getHeight(inline);
|
|
block.style.height = height;
|
|
block.style.lineHeight = height;
|
|
}
|