gpt4 book ai didi

javascript - 从下到上加载图像?

转载 作者:太空狗 更新时间:2023-10-29 15:01:21 25 4
gpt4 key购买 nike

是否可以从下往上加载图片?

假设我有一张非常长的图片,需要60 秒加载。并且内容可以从底部顶部阅读,我能做些什么让浏览器从底部到顶部加载我的图像,以便用户可以在加载图像时读取它?

谢谢,

这是一个与这个问题相关的有趣的“AAAAAND ITS GONE”模因。

AAAAAAAND ITS GONE


感谢所有回答我问题的人,以下是我总结的一些解决方案:

解决方案 1:( Derek's answer )

翻转图片然后用-webkit-transform: scaleY(-1);

显示

演示:http://jsfiddle.net/Nk6VP/

解决方案 2 ( aloisdg's answer )

使用 BMP 格式,这样浏览器会“向上”加载图像,但是 BMP 不是保存大图像的好文件类型,但它仍然是一个很好的尝试因为您不需要在服务器端翻转图像。

演示:http://jsfiddle.net/dfbPz/

(请禁用缓存以查看演示中的加载)

最佳答案

事实上,你可以。只需使用 BMP 格式。这种格式从底部存储。

您可以找到向上加载图像的示例here . (您必须单击“位图和 .rle 图像”按钮才能显示示例。)

来自 fileformat.info 的位图文件格式:

[Regarding file header structure] If Height is a positive number, then the image is a "bottom-up" bitmap with the origin in the lower-left corner. If Height is a negative number, then the image is a "top-down" bitmap with the origin in the upper-left corner.

您可以找到有关此 topic in SO 的更多信息或 this one .

关于javascript - 从下到上加载图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22124580/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com