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

HTML5, CSS3 and JavaScript

The Fine Art of Web Development by Martin Ivanov

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:

[sourcecode language=”css”]
@-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;
}
}[/sourcecode]

Categories and Tags
Links

© 2006 - 2018 Martin Ivanov