在iframe中显示缩略图 [英] Display thumbnail image in iframe

查看:556
本文介绍了在iframe中显示缩略图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这方面还很陌生。我有以下 iframe

I am fairly new in this. I have the following iframe

<iframe width="560" height="315" src="<%=video1[1]%>" frameborder="0" allowfullscreen></iframe> 

我想做的就是播放 video1 [1] ,但显示 video1 [2] 中的图像。

What I am trying to do is have it play video1[1], but show the image that is in video1[2].

我尝试过是:

<iframe width="560" height="315" href="<%=video1[2]%>" src="<%=video1[1]%>" frameborder="0" allowfullscreen></iframe>

但这不起作用。

是否有一种简单的方法?

Is there a simple way of doing it?

推荐答案

iFrame标记没有 href 属性。
请参阅: http://www.w3schools.com/tags/tag_iframe.asp

iFrame tag has no href attribute. See: http://www.w3schools.com/tags/tag_iframe.asp

您也许可以构建一个iFrame作为链接的目标:

You could maybe build an iFrame which acts as a target for a link:

<iframe width="560" height="315" src="<%=video1[1]%>" frameborder="0" allowfullscreen> name="iframe_video1"></iframe>

<a href="<%=video1[2]%>" target="iframe_video1"><img src="<...>"></a>

BTW:请注意,在iFrame的source属性中,必须有一个文档(即网页) ),没有直接的媒体/视频。
您可以使用YouTube链接,例如嵌入....

BTW: Pay attention that in an iFrame's source attribute, there has to be a document (i.e. web page) referenced, no media/video directly. You could use YouTube links e.g. to be embedded....

这篇关于在iframe中显示缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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