Answer the question
In order to leave comments, you need to log in
How to get the height of the background image of a div?
Actually how to find out the size of the background image of the block?
https://codepen.io/anon/pen/wmzwRK
Answer the question
In order to leave comments, you need to log in
var img = new Image;
img.src = $('#imgBlock').css('background-image').replace(/url\(|\)$/ig, "");
/* размер оригинальной картинки */
var bgImgWidth = img.width;
var bgImgHeight = img.height;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question