没有smil,gif是我唯一的选择吗? [英] without smil, is gif my only option?

查看:118
本文介绍了没有smil,gif是我唯一的选择吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我最近遇到了这个警告

So I've recently encountered this warning

SVG's SMIL animations (<animate>, <set>, etc.) are deprecated and will be removed. Please use CSS animations or Web animations instead.

进行了尽可能多的研究,我一直在寻找用Web动画替换SMIL的借口(如果我们是技术人员,则SMIL ),但这都涉及JavaScript和CSS.我在<img>标签中使用了动画SVG,因为这就是SVG格式的重点:它是图像.

Doing as much research as I could, I keep finding excuses about replacing SMIL with web animations (which SMIL is if we're being technical) but this all involves JavaScript and CSS. I use animated SVGs in <img> tags because that's the point of the SVG format: it's an image.

这真的非常好,因为这至少使我能够在臭名昭著的混乱网络中组织图像(例如,JavaScript没有导入,因此您必须填充全局范围).

This was really nice and all because it allowed me to at least organize my images on a web that's notorious for being a giant mess (e.g. JavaScript has no imports so you have to fill the global scope).

现在我无法使用SVG进行动画制作,GIF是自包含动画的唯一选择吗?

Now that I can't animate with SVG, is GIF the only option for self-contained animations?

推荐答案

SMIL并非已失效/已弃用

SMIL is not as dead/deprecated as you believe it is. The Chrome developers recently posted this:

我们非常重视您的所有反馈,很明显,SMIL提供了一些用例,这些用例还没有高保真度的替代品.因此,我们决定中止弃用的意图,并采取较小的措施来实现其他选择.

We value all of your feedback, and it's clear that there are use cases serviced by SMIL that just don’t have high-fidelity replacements yet. As a result, we’ve decided to suspend our intent to deprecate and take smaller steps toward other options.

这篇关于没有smil,gif是我唯一的选择吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆