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

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

问题描述

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

我查看了它,似乎您可以使用 gifsockets 继续向动画 GIF 发送新帧,因为 GIF 没有指定在浏览器中加载时有多少帧.这是在 github 上:http://github.com/videlalvaro/gifsockets

我觉得这确实很有趣,而且效果很酷.有没有人对如何实现这一点有任何其他见解?似乎他们在 Onnit 使用的那个似乎根据 URL 或图像末尾附加的日期更改倒计时.

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

我正在尝试通过电子邮件发送相同的内容,但我有点困惑.

解决方案

虽然 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天全站免登陆