如何通过在CSS文件中的另一个图像显示一个图像显示图像
Q
显示图像
0
A
回答
5
使用CSS可以指定一个元素的z-index,这将允许您到每个“顶部”“栈”的元件其他将样式呈现给标记时。例如,您可以给出两个元素在页面上的完全相同的位置,但不同的z-index值,并且它们将被堆叠,一个在另一个之上。
这通常与一个元素的float或absolute positioning一起使用,因为传统流动元素通常相对于它们的位置相互“推”,而不是绝对相互位置。 Example here。 Lots of information here。
0
你应该发布一些更多的信息,但至少看看css here的z-index功能。如果我理解你的问题,这应该会有很大的帮助。
1
有几种方法,但关键是使用z-indexes定位(例如position: relative
)。
0
这是适用于所有的主流浏览器.. 检查了这一点
<html>
<head>
<style>
.search_customization-icon_icon {
position: relative;
margin-top: -40px;
margin-left: 3px;
width: 162px;
height: 22px;
display: block;
background: url(http://Apparelnbags.com/skins/skin_1/images/anb_icon_sold-with-customization_icon.png) no-repeat center;
}
</style>
</head>
<body>
<table>
<tr>
<td style="padding-right:5px;">
<span style="width:190px;height:235px;display: block;">
<a title="Alternative AA04 Ladies Rib Crew" href="http://www.apparelnbags.com/alternative/aa04-53-oz-rib-crew-t-shirt.htm">
<img src="http://images.apparelnbags.com/product/icon/AA04.jpg" style="position:relative;border:0">
<span class="search_customization-icon_icon">
</span>
</a>
</span>
</td>
</tr>
</table>
</body>
</html>
相关问题
发表一些代码?你想要它看起来像什么屏幕截图?再加一些,也许你会得到答案。 – xthexder
阅读此正确形成您的问题,并得到一个有价值的回应:http://meta.stackexchange.com/questions/18614/style-guide-for-questions-and-answers/18616#18616 – motoxer4533
我现在这个代码高:div.art-header-jpeg { position:absolute; top:0; right:0; width:892px; height:200px; background-image:url('http://localhost/adwebservice/images/header.jpg'); background-repeat:no-repeat; background-position:center center; } 现在我想在此图像上添加另一幅图像 – user1036474