如何将图像放在另一个? [英] How to place an image over another?
问题描述
如何将图片放在另一个较大的图片上,例如在YouTube上,播放按钮显示在视频缩略图顶部?
这里的每个人的答案都太复杂了。
制作一个PNG图形,半透明,带有似乎表示播放的符号。使它的大小,你想要的,也许一个320x240的图形或什么不。假设您命名为overlay.png
假设YouTube生成的缩略图位于 http://img.ytimg.com/abcdefg/0.jpg
现在你所需要的代码就是这样:/ p>
< a href =destination_of_your_link>< img src =overlay.pngwidth =320height =240 border =0style =background:URL(http://img.ytimg.com/abcdefg/0.jpg)center center black; />< / a>
只要您的目标受众尚未使用IE6,您应该是安全的。
How to put an image over another bigger image, like on youtube, a play button is displayed on top of video thumbnail?
Everyone's answers here are way too complicated.
Make a PNG graphic, semitransparent, with a symbol that seems to indicate "play". Make it the size you want, maybe a 320x240 graphic or what not. Let's say you named it "overlay.png"
Let's say the YouTube generated thumbnail is at http://img.ytimg.com/abcdefg/0.jpg
Now all you need in your code is this:
<a href="destination_of_your_link"><img src="overlay.png" width="320" height="240" border="0" style="background:URL(http://img.ytimg.com/abcdefg/0.jpg) center center black;" /></a>
As long as your target audience is not still using IE6, you should be safe.
这篇关于如何将图像放在另一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!