Board Thread:JS and CSS Support/@comment-36889200-20190405103441

Hello. I'm looking for an alternative to the .gif format, used to animate images, because it has very great flaws: the lack of the alpha channel and the use of few colors. In fact, by importing a gif image, it makes it look very bad especially in the transparent points. The solution I currently use is to create a gif with a colored background in order to remove transparency (like this: ), but I don't really like it. Looking around I found that you can animate a sprite with css. It works but the problem is that I have to use it in a template and in the parameters I can't add html code to define the class of the animated sprite. I give an example (I'll put names at random): I have to use a "Test" template which is a table with various cells. In each cell there are the parameters. Calling "Test" on a page I can't do this thing:

because nothing would appear. I need to do this because I have to use different sprites with different sizes and frames number, so I need to have the possibility to set different classes. I had thought of considering the class as a parameter in the template but even this doesn't work, that is, I had done something like:

 but nothing. Creating a javascript code seems too much, so if anyone has any ideas or solutions I would be really grateful. 