Good day all.
I have a div, with a background image with its size set to cover.
how do I get the background size with javascript, or jquery?
I mean, the background will fill the div with one of its dimensions, width or height, I would like to understand which are the width and height of the full (Computed) image, not only the visible part.
<style>
body {width:100%; height:100%}
#fullCoverBg {background-image:url("ani_bg.jpg"); background-repeat:no-repeat; background-size:cover; background-position:right;}
@media all and (max-width : 1000px) {
/* small screens */
aside {height:30%; width:100%;}
#fullCoverBg {height:70%; width:100%;}
}
@media all and (min-width : 1001px) {
/* big screens */
aside {height:100%; width:30%;float:left;}
#fullCoverBg {height:100%;width:70%;float:left;}
}
</style>
<body>
<aside>this div stay on head on small devices, and go on the left side on big screens </aside>
<div id="fullCoverBg"></div>
</body>
let's say we resize the wwindow, we will see the background cover the entire div, and of course some parts will be not visible, becouse "cover" fill up the div in its width OR height... for each resize, which are the dimension of the full image (visible and invisible parts) ?