cross browser - preloading images from css, what's the governing rule? -
all visitors visit page load style.css contains colorbox line:
#cboxloadinggraphic{background:url(/images/animation.gif) no-repeat center center} this animation image should show when clicking button on page, loading animation displayed while loading colorbox modal window.
yet, i've noticed there various visitors automatically preload animation.gif, though didn't click button (and didn't open modal window).
but since happening 1/3 of visitors, different browesers, can't understand what's governing rule, makes 1 user preload it, , user load when , if clicks on said button?
the rules along these lines:
it not matter put in css in terms or links images, since it(browser) load resource if element on page , visible! visible means except display:none , different states of element, :hover state.
this not apply embedded base64 images inside css files. load stylesheet.
Comments
Post a Comment