How I can get an exact number of pixels of a specific element, I have to implement animation on the page scroll.
Give the element an ID
You could use the plugin toolbox to run some JavaScript and out put a value
You should use the .offsetWidth
and .offsetHeight
properties. Note they belong to the element, not .style
.
var width = document.getElementById('foo').offsetWidth;
1 Like
This topic was automatically closed after 70 days. New replies are no longer allowed.