Instead of calculating it yourself, you can get this via the HTMLDOMElement
‘s getBoundingClientRect()
.
This will return an object with the correct height
and width
, taking into account the transformation matrix.
More Related Contents:
- How to display an chage photo option on mouse hover similar to linkedin using Javascript? [closed]
- Input type="text" with select functionality after clicking on Input type="text"
- jQuery .animate function not responding properly
- How to force browser to show image 3 inches wide?
- Reloading a single div in an html page [closed]
- Javascript Execute message when mouse is on left side of page [closed]
- Different look in desktop, how to setup
- fixing slider on my website [closed]
- Can I use HTML tags in the options for select elements? [duplicate]
- Clear icon inside input text
- How to connect HTML Divs with Lines? [duplicate]
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- make html text input field grow as I type?
- how to disable DIV element and everything inside [duplicate]
- Scale a div to fit in window but preserve aspect ratio
- How to open specific tab of bootstrap nav tabs on click of a particuler link using jQuery?
- How Do I Stop My Web Content From Shifting Left When The Vertical Scrollbar Appears? Roll-Up of Advice 2017 [duplicate]
- Load HTML page dynamically into div with jQuery
- Possible to associate label with checkbox without using “for=id”?
- jQuery position DIV fixed at top on scroll
- How to define the css :hover state in a jQuery selector?
- jQuery: Slide left and slide right
- jQuery in Chrome returns “block” instead of “inline”
- Detect browser wrapped lines via javascript
- Extracting text from a contentEditable div
- Prevent iOS bounce without disabling scroll ability
- How can I dynamically highlight strings on a web page?
- Wrapping lists into columns
- Possible to reverse a css animation on class removal?
- In jQuery mobile, what’s the diff between tap and vclick?