d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Webm Or Gif Background
Add Reply New Topic New Poll
Member
Posts: 2,078
Joined: Aug 26 2015
Gold: Locked
Trader: Scammer
Warn: 10%
Jul 25 2016 03:55am
Was wondering. I have 3 symbol / logos on my page. I want it where if i hover on one of the logos, a smoke effect plays in the background of it.

Would this be done with a webm in the background or a gif that replaces the original image on hover

When you stop hovering, the background smoke would disappear

Edit: I'm just wondering if a gif image would take to much bandwidith and load slowly for people causing an ugly animation. But a webm wouldn't play until its fully loaded

This post was edited by D2key on Jul 25 2016 04:24am
Member
Posts: 1,028
Joined: Feb 16 2009
Gold: 0.00
Jul 26 2016 01:07pm
Gifs are not too bad in terms of performance as long as you don't have a bunch of them.
Member
Posts: 10,971
Joined: May 15 2006
Gold: 0.00
Aug 7 2016 04:47pm
I would go for gif, webm isn't as widely supported as gif, and gifs can be made super tiny.
Member
Posts: 3,014
Joined: Dec 18 2010
Gold: 11,659.50
Aug 9 2016 01:13am
ofc .webm is better, but some browsers can't use .webm so i suggest using both.

"using gif in 2016 LUL."
Member
Posts: 6,328
Joined: Aug 12 2014
Gold: Locked
Aug 23 2016 01:58am
Quote (kenshinkiba @ Aug 9 2016 03:13am)
ofc .webm is better, but some browsers can't use .webm so i suggest using both.

"using gif in 2016 LUL."


browser detection ftw
Member
Posts: 10,971
Joined: May 15 2006
Gold: 0.00
Oct 4 2016 07:10am
I would just use a gif. But use CSS to set/unset the smoke animation:

.button {
background-image: none;
}
.button:hover {
background-image: url('smoke.gif');
}
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll