如何使徽标图像可见?

时间:2016-01-15 15:18:01

标签: html css

无法查看徽标图片,请帮忙?我只想让徽标显示在背景图片上。



body {
  margin: 0px;
  padding: 0px;
  border: 0px;
}
#masterImg {
  height: 100%;
  width: 100%;
  position: fixed;
}
#masterImg img {
  height: 669px;
  width: 1366px;
}
#logo img {
  z-index: 10;
}

<div id="masterImg">
  <img src="img/masterImg1.jpg" alt="img1" / style="display:none">
  <img src="img/masterImg2.jpg" alt="img2" style="display:block" />
</div>
<div class="container" id="container">
  <div id="logo" style="background:transparent">
    <img src="img/logo.png" alt="logo" />
  </div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:2)

您需要添加position: relative才能应用z-index

#logo img {
  position: relative;
  z-index: 10;
}