I'd say an important factor is the size of images you want to cycle. For very small images, perhaps sub-100px, an animated GIF might be ok. For anything larger, such as portfolio or item images, they're pretty much unacceptable. It's not so much about semantics or SEO, but rather image quality; GIFs simply don't look good for complex (e.g. photographic) images.
HTML5 doesn't come in to the equation, the markup will be almost identical between (X)HTML4 and HTML5. The javascript is the key part in cycling images, and there are a whole bunch that do all sorts of fancy things, depending on your needs. One of the most well-known jQuery plugins is the cycle plugin. It's very easy to implement.
To return to the idea of semantics and SEO, a GIF embedded in a page doesn't look like many images, so search engines won't know it, meaning any one performing an image search pertaining to what you're trying to display won't find your images. If you use a JS cycle approach, all of your images will be embedded separately in to the markup, and search engines will pickup on this. It does allow users to download the individual images, whereas with a GIF it would require either deconstruction in a GIF editor or a screenshot, but this will either be an advantage or hindrance, which you can consider accordingly.
To summarise: you almost certainly want to cycle to images with javascript.
I would definitely not use flash for something so simple, especially when it makes that part of your website inaccessible to devices such as the iPhone, iPad, etc. HTML5 is nice, but no browser supports 100% of it, and some of the mobile browsers are very lacking in support. A gif would probably be the easiest hassle free way of doing this.
Depends how complex it is... if it's only a short series of images simply use JavaScript without HTML5. You'd only have to write a few lines of code to produce the effect.
Animated gifs aren't dead. In fact, they're probably more popular now than they have ever been because of so many animated gif memes. That being said, animated gifs can be useful, but consider the advantages of a more dynamic format, that animated gifs can't recreate:
Transitions between images
Can be generated dynamically
File size might be lower
If you don't need those features, or anything else that Javascript provides, then use an animated gif.
As previous answers mention, if an animated GIF is all you need, then go for it.
Flash would be a slight case of overbombing.
If you want something slightly more flexible, you can still use js without bringing HTML5 into the mix, of course. By making a simple jQuery slideshow out of it, you could buy yourself transition effects and an easy way to replace images. But again, if you don't need that, or that is overkill, then go with the GIF.
发布评论
评论(7)
我想说一个重要因素是您想要循环的图像的大小。对于非常小的图像,也许不到 100 像素,动画 GIF 可能就可以了。对于任何较大的东西,例如投资组合或物品图像,它们几乎是不可接受的。这与语义或 SEO 无关,而是图像质量; GIF 根本不适合复杂(例如摄影)图像。
HTML5 不参与其中,(X)HTML4 和 HTML5 之间的标记几乎相同。 javascript 是循环图像中的关键部分,并且有一大堆 JavaScript 可以根据您的需要执行各种奇特的操作。最著名的 jQuery 插件之一是 cycle 插件。它很容易实现。
回到语义和 SEO 的概念,页面中嵌入的 GIF 看起来不像许多图像,因此搜索引擎不会知道它,这意味着任何人执行与什么相关的图像搜索您尝试显示时找不到您的图像。如果您使用 JS 循环方法,所有图像都将单独嵌入到标记中,搜索引擎将对此进行处理。它确实允许用户下载单个图像,而使用 GIF 则需要在 GIF 编辑器中解构或屏幕截图,但这要么是优势,要么是障碍,您可以相应地考虑。
总结一下:您几乎肯定想使用 javascript 循环访问图像。
I'd say an important factor is the size of images you want to cycle. For very small images, perhaps sub-100px, an animated GIF might be ok. For anything larger, such as portfolio or item images, they're pretty much unacceptable. It's not so much about semantics or SEO, but rather image quality; GIFs simply don't look good for complex (e.g. photographic) images.
HTML5 doesn't come in to the equation, the markup will be almost identical between (X)HTML4 and HTML5. The javascript is the key part in cycling images, and there are a whole bunch that do all sorts of fancy things, depending on your needs. One of the most well-known jQuery plugins is the cycle plugin. It's very easy to implement.
To return to the idea of semantics and SEO, a GIF embedded in a page doesn't look like many images, so search engines won't know it, meaning any one performing an image search pertaining to what you're trying to display won't find your images. If you use a JS cycle approach, all of your images will be embedded separately in to the markup, and search engines will pickup on this. It does allow users to download the individual images, whereas with a GIF it would require either deconstruction in a GIF editor or a screenshot, but this will either be an advantage or hindrance, which you can consider accordingly.
To summarise: you almost certainly want to cycle to images with javascript.
我肯定不会将 Flash 用于如此简单的事情,尤其是当它使 iPhone、iPad 等设备无法访问您网站的该部分时。HTML5 很好,但没有浏览器支持 100%它,并且一些移动浏览器非常缺乏支持。 gif 可能是最简单、最省事的方式。
I would definitely not use flash for something so simple, especially when it makes that part of your website inaccessible to devices such as the iPhone, iPad, etc. HTML5 is nice, but no browser supports 100% of it, and some of the mobile browsers are very lacking in support. A gif would probably be the easiest hassle free way of doing this.
动画 GIF 没有好坏之分。它们是受到广泛支持的工具。如果它们解决了您的问题,您应该毫不犹豫地使用它们。
Animated gifs are not good or bad. They are a tool that is widely supported. If they fix your problem you should not hesitate to use them.
动画 GIF 在任何地方都适用。
Flash 非常重量级,并且会产生对 Flash 的依赖。
HTML5 很好,但还没有得到所有人的支持。
Animated gifs would work everywhere.
Flash would be extremely heavyweight and creates a dependency to a flash.
HTML5 is nice, but is not supported by everyone yet.
取决于它有多复杂......如果它只是一系列简短的图像,只需使用 JavaScript 而不使用 HTML5。您只需编写几行代码即可产生效果。
Depends how complex it is... if it's only a short series of images simply use JavaScript without HTML5. You'd only have to write a few lines of code to produce the effect.
动画 GIF 并没有消亡。事实上,由于如此多的动画 gif 模因,它们现在可能比以往任何时候都更受欢迎。话虽这么说,动画 gif 可能很有用,但请考虑更动态的格式的优点,动画 gif 无法重新创建:
如果您不需要这些功能,或者Javascript 提供的任何其他内容,然后使用动画 gif。
Animated gifs aren't dead. In fact, they're probably more popular now than they have ever been because of so many animated gif memes. That being said, animated gifs can be useful, but consider the advantages of a more dynamic format, that animated gifs can't recreate:
If you don't need those features, or anything else that Javascript provides, then use an animated gif.
正如之前的答案所提到的,如果您只需要一个动画 GIF,那就去做吧。
Flash 有点过度轰炸的情况。
当然,如果您想要更灵活的东西,您仍然可以使用 js,而不需要将 HTML5 引入其中。
通过用它制作一个简单的 jQuery 幻灯片,您可以为自己购买过渡效果和替换图像的简单方法。但同样,如果您不需要它,或者这太过分了,那么就使用 GIF。
As previous answers mention, if an animated GIF is all you need, then go for it.
Flash would be a slight case of overbombing.
If you want something slightly more flexible, you can still use js without bringing HTML5 into the mix, of course.
By making a simple jQuery slideshow out of it, you could buy yourself transition effects and an easy way to replace images. But again, if you don't need that, or that is overkill, then go with the GIF.