我尝试获取元素的宽度,但返回值错误
let container = document.querySelector('.content')
console.log(container.offsetWidth) //this will log wrong value 1182px instead of 960px
console.log(getComputedStyle(container).width) //1182px anyway I don't have any idea from where the value comes
我不知道为什么返回的值是错误的