background-image, 100%. , 1000 . , - , .
You can also create code to place the tag <img>inside the div. Then the image can be scaled to 100%. To do this, you should ask things in CSS or a div like this:
$('div.niceImage').each(function()
{
var imUrl = $(this).style('background-image');
$(this).prepend('<img style="position:absolute;width:100%;height:100%;" src="' + imUrl + '" />');
});
source
share