Getting the shape/outline of an HTML node in JavaScript -
is possible shape/outline of dom node in javascript? kind of representation of shape or outline can tell pixels dom node occupies. can calculate rectangle using width, height, , position, doesn't take account border-radius property, among others.
i know have access of individual properties determine rendered outline of node (height, width, border-radius, etc), could, in javascript, reproduce calculations browser does. however, pretty tedious , there lot of edge cases.
and don't forget different browsers may render different. if interested in padding , margin well.
Comments
Post a Comment