Bing.com 如何创建放大的缩略图? [英] How does Bing.com create enlarged thumbnails?

查看:47
本文介绍了Bing.com 如何创建放大的缩略图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 Bing.com 搜索图像时,我发现它们的图像经过精心裁剪和排序.当您将鼠标放在图像上时,另一个窗口会弹出一个放大的图像.

When I search images using Bing.com, I realize their images are well cropped and sorted. When you place your mouse on an image, another window will pop up with an enlarged image.

http://www.bing.com/images/search?q=Heros&FORM=BIFD#

我想在我的程序中做同样的事情.我检查了他们页面的源代码.他们正在使用 javascript,但我仍然不知道他们是如何做到的.有没有人熟悉它?欢迎提出任何建议.

I want to do the same thing in my program. I checked the source code of their page. They are using javascript, but still I have no clue how they make it. Does anyone familiar with it? Any suggestion is welcomed.

推荐答案

如果您查看 HTML,您会在每个图像的正上方看到一个 span.它将该框架的显示样式从无"设置为块".然后它使用一个动画库来调整覆盖帧内容的大小.

If you look at the HTML, you'll see a span immediately above each of the images. It sets that frame's display style from "none" to "block". It then uses an animation library to resize the content of the covering frame.

这篇关于Bing.com 如何创建放大的缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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