我正在尝试在Chrome中解决此问题,因为clientHeight
属性在Chrome中不起作用?
function getMiddle (param1,param2) {
var circle = document.getElementById(param1);
var div = document.getElementById(param2);
var clientHeight = div.clientHeight;
var new_height = Math.round(clientHeight/2)-25;
circle.style.marginTop =new_height + "px";
circle.style.visibility="visible";
}