Html图像上的图像 [英] Html Image over image

查看:67
本文介绍了Html图像上的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何在不使用 Z-index Z-order

Can anyone tell me how can I add an image over another image without using Z-index or Z-order?

推荐答案

很难在不知道你想要实现什么的情况下正确回答,z-index可能不是你实际上需要。例如下面的工作:

Difficult to answer properly without knowing exactly what you want to achieve, z-index probably isn't what you actually need. For instance the following would work:

<div id="container">
    <img src="img1.jpg" id="img1" />
    <img src="img2.jpg" id="img2" />
</div>

#container {
    position:relative;
}

#img2 {
    position: absolute;
    left: 50px;
    top: 50px;
}

也可以使用< img& code>标签或背景图像取决于图像的语义值,即它们是页面的呈现内容还是现实内容?

Also whether you use <img> tags or background-images depends on the semantic valueof the images, i.e. are they presentational or actualy content of the page?

这篇关于Html图像上的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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