I have a submit button that changes when the user hovers his mouse over it. Right now the image is taking a while to load and you get a 开发者_开发问答half second where there is white screen instead of the other button. Is there anyway to improve this using just CSS and HTML or do I need to do some JS work?
Use a sprite image, and then toggle background position on hover. That ensures that the image being displayed on hover has already been downloaded.
CSS Sprites
And load the css sprites when DOM is ready, this can sort of "preload" the image before user hovers on the submit button :)
精彩评论