I'm using, $0.getBoundingClientRect() or $0.offsetTop on an element in the inspector but it returns the wrong pixel value when compared to measuring the actual pixels, using the screenshot tool, CMD + Shift + 4 in mac.
I have been working the whole day with this, trying to use only inline styles, and copy+pasting the contents of the elements tab in the inspector into a new tab in about:blank. The funny thing is in the new tab it shows the correct value. Is can javascript code tinker with this API? I'm using a virtual dom library to generate the DOM nodes.
Aucun commentaire:
Enregistrer un commentaire