倒计时计时器图像电子邮件中的GIF [英] Countdown Timer Image GIF in Email

查看:828
本文介绍了倒计时计时器图像电子邮件中的GIF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近收到了Onnit Labs的一封电子邮件,其中包含使用gif图像的电子邮件中的倒计时模块计时器。可以在这里查看电子邮件:



我看着它,似乎你可以继续发送新的使用gifsockets的GIF动画GIF框架,作为GIF没有指定在浏览器中加载多少帧。这里是github: http://github.com/videlalvaro/gifsockets



我以为这很有趣,效果很好。有没有人有什么其他见解如何才能实现?看起来好像他们在Onnit上使用的一样,似乎根据URL或图像结尾附加的日期来更改倒计时。



onnit.com/emails/_modules/timer/?end=2012-12-27+00:00:00&dark=1



我正在尝试通过电子邮件发送相同的东西,但是我有点沮丧。

解决方案

code> gifsockets 将工作(我没有尝试过...),当我看着除了初始图像加载之外的图像时,没有网络流量。我也看到它再次从41跳到42。一个重新加载将它下降到39。



它似乎只是一个生成60帧动画的脚本,并将它们发送给用户。这可能是用任何语言完成的。



以下是在PHP中如何完成:



http://seanja.com/secret/countdown/




I recently received an emailer from Onnit Labs that included a Countdown Module Timer inside the emailer using a gif image. The emailer can be viewed here: https://www.onnit.com/emails/lastchance-historic/

The Image can be seen here:

I looked into it, and it seems you can keep sending new frames to an animated GIF using gifsockets, as a GIF doesn't specify how many frames it has when loaded in the browser. Here it is on github: http://github.com/videlalvaro/gifsockets

I thought this was pretty interesting and a cool effect indeed. Does anyone have any other insights on how this could be accomplished? It seems as though the one they're using at Onnit seems to change the countdown according to date appended at the end of URL or image.

onnit.com/emails/_modules/timer/?end=2012-12-27+00:00:00&dark=1

I'm trying to accomplish the same thing to send in an email, but I am a little stumped.

解决方案

While maybe gifsockets would work (I haven't tried that before...), there is no network traffic while I am looking at the image other than the initial image load. I am also seeing it it jump from 41 to 42 again. A Reload took it down to 39.

It appears to be just a script that generates 60 frames of animation and sends them to the user. This could probably be done in any language.

Here is how it is done in php:

http://seanja.com/secret/countdown/

这篇关于倒计时计时器图像电子邮件中的GIF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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