Kevin 4e25309391 correction && add form && add slide && add masonry && css | 4 anos atrás | |
---|---|---|
.. | ||
test | 4 anos atrás | |
README.md | 4 anos atrás | |
bower.json | 4 anos atrás | |
get-size.js | 4 anos atrás | |
package.json | 4 anos atrás | |
sandbox.html | 4 anos atrás |
Get the size of elements. Used in Masonry, Isotope, & Flickity.
var size = getSize( elem );
// elem can be an element
var size = getSize( document.querySelector('.selector') )
// elem can be a selector string
var size = getSize('.selector')
Returns an object with:
Browser support: IE10+, Android 4.0+, iOS 5+, and modern browsers
Install with npm: npm install get-size
Install with Bower: bower install get-size
Firefox has an old bug that occurs within iframes that are hidden with display: none
. To resolve this, you can use alternate CSS to hide the iframe off-screen, with out display: none
.
.hide-iframe {
visibility: hidden;
position: absolute;
left: -999em;
}
getSize is released under the MIT License.