Overriding the Default Placeholder Styles for Loading and Broken Images in Firefox

A quick and dirty trick for overriding the system styles of the loading and broken image placeholders in Firefox in case you have ever wondered if it is possible:

@-moz-document url-prefix() {
    /* hide the system icon for loading images */
    img:-moz-loading {
        visibility: hidden;
    }
    /* hide the system icon for broken images */
    img:-moz-broken {
        -moz-force-broken-image-icon: 0;
    }
}
Advertisements

One comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s