GIF处理时预加载缩略图

时间:2015-11-13 18:14:57

标签: html css load gif

我有一个加载10-20MB GIF的网站。虽然这次,用户必须等到完全处理完毕。

现在我想到了在GIF中显示第一张图片的缩略图,而真正的GIF正在后台处理。

目前我正在使用以下代码加载GIF。

html { 
  background: url(<?= DataSource::getCurrentTimeLapsePath() ?>) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

是否可以使用thumbnail-idea优化/扩展它?

<?= DataSource::getCurrentTimeLapsePath() ?>

此代码返回当前的Timelapse-GIF路径。

0 个答案:

没有答案
相关问题