base64 encoded animated gif as css background?
问题 I have an animated gif encoded into my css as such: .magicBg { background-image: url(data:image/gif;base64,R0lGODlhAQBkAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0ND ... } This animated gif is encoded to play once. However, once this animated gif plays once as background on an element, it never plays again. Using $('body').removeClass( 'magicBg' ); $('body').addClass( 'magicBg' ) Has no effect -- we start on the final frame of the gif. Any ideas how to make this play from the