English 中文(简体)
显示装载图像仍显示“浏览器装载图像”icon
原标题:showing loading image still shows "browser loading image" icon

i 在实际图像被下载之前,该法典将装上我的图像。

 $( img.loadable-image ).css( background ,  transparent url(/images/ajax-loader1.gif) no-repeat center center )
$( img.loadable-image ).load(function() { $(this).css( background ,   ); });

这一工作表明,在图像下载之前,我装满一孔,但也显示背景。

我的原始形象就是:

<img class="loadable-image" src="mysite.com/validimage.jpg" border="0" height="50" width="50">

一、导 言

alt text http://img820.imageshack.us/img820/3289/ajaxload.png

如你在左边看到的那样,你看看看不到多少 a子的载荷,也看着周围的缺失形象。

是否有任何建议?

最佳回答

。 http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.2 ,其中界定:<img> tag必须具备src属性。

缺失的广场将按<代码>src的属性:<img>。 如果不打上有效形象的URL,你就会打上“中间形象”框架。 将斜体而不是背景(或将其置于透明的形象)或改为“条码”和“条码”;

无效:src Depende = “broken concept” icon:

<img alt="" style="width:50px; height:50px; background-image:url(bg.gif)" />

有效,src 属性:

<img alt="" src="transparent.gif" 
     style="width:50px; height:50px; background-image:url(bg.gif)" />

在你的耳光之后,我可以看到你正确做,问题就是要花很长时间才能下载图像。 在此情况下,你有几种选择:

<span class="loadable-image-container">
    <img class="loadable-image" src="mysite.com/validimage.jpg" 
        border="0" height="50" width="50">
</span>

j 质量,如:

$( img.loadable-image-container )
    .css( background , 
       transparent url(/images/ajax-loader1.gif) no-repeat center center )
    .children().css( visibility ,  hidden );

$( img.loadable-image ).load(function() { 
    $(this)
        .css( visibility ,  visible )
        .parent().css( background ,   ); 
});
问题回答

暂无回答




相关问题
Using QCView and iSight to capture image

I have a QCView that loads a Quartz file which gives you iSights feedback (basically like a QTCaptureView) Everything displays fine The button simply takes a snapshot using the following simple ...

Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Transform rectangular image into trapezoid

In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can t see a trapezoidal transformation. I m using the usual System.Drawing.* API, but I m ...

Rotate image through Y-axis on web page

What are my options for rotating an image on a web page through the Y-axis? I m not sure if I even have the terminology right. Is this called a rotate or a transform. Most of the searches that I ve ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

Convert from 32-BPP to 8-BPP Indexed (C#)

I need to take a full color JPG Image and remap it s colors to a Indexed palette. The palette will consist of specific colors populated from a database. I need to map each color of the image to it s "...

热门标签