I have the following CSS class that I\'m applying on a
You also can provide a function that simply replaces the img tag by the div/background so that you benefit from both the onload attribute and the flexibility of the div. Of course, you can fine tune the code to best suits your need, but in my case, I also make sure that either the width or the height is preserved for a better control of what I expect. My code as follows: tag:
.bg {
background-image: url(\'bg.jp