console.log($(".childrenDiv").outerWidth(true)); 我得到怎么是父元素的800 console.log($(".childrenDiv").outerHeight(true));得到的是400
你看一下应该是childrenDiv的CSS里面设定了box-sizing:border-box,这个属性会使border和padding全会在你设置的宽度和高度内部,所以此时的outerHeight()和outerWidth()值是300+margin*2