[RESOLVED] Remove quare when image is not loaded yet...
Hi,
A small question,
Is it possible to remove the square that you see when an image isnt loaded completly yet?
I woul like to have it plain white (as is the background of the site)
Thanks!
S
When the only tool you have is a hammer, everything looks like a nail.
i had done this using a trick maybe helps you too.
<img src="blank.gif" width="100" height="100" style="background: url(image.jpg);" />
put a blank gif or png as an image and the original image as its background
but make sure blank image must exists
width and height is also set properly
Adding a background image to a foreground image is really an overkill if not counterproductive. Yes, it's a trick but one with a price: an additional http request to the server which just increases the page download time. Besides, using inline style should only be a last resort, read when really necessary.
sometimes, th eimages are not shown fast enough.
at that moment, briefly, a square where the image should be shown is displayed (square as big as the image, not the little red cross thing)
this square has borders etc...
i wander how i can remove these squares, if even possible...
thanks!
When the only tool you have is a hammer, everything looks like a nail.
hMMm, i think this issue is with a specific browser. chrome does not show this kind of the box while loading an image. you can optimize image file size and set some cache. also you can set image' style "display: none;" and then you can use onload event to show the image.
sometimes, th eimages are not shown fast enough.
at that moment, briefly, a square where the image should be shown is displayed (square as big as the image, not the little red cross thing)
this square has borders etc...
i wander how i can remove these squares, if even possible...
Bookmarks