css - 无法在 div 中的另一个图像上显示图像

标签 css html image

<div id="back">
<div id="scale"></div>
<div id="pointer"></div>
</div>


CSS CODE :


#back
{width:99%;
height:100px;
position:relative;
}

#scale
{width:99%;
 height:100px;
 position:absolute;
 top:0px;
 left:0px;
 background-image:url(Number_guessing_game/image/scale.png);
 background-repeat:no-repeat
 }

 #pointer
 {width: 17px;
  height: 22px;
  position: absolute;
  top: 0px;
  left: 0px;
  background-image:url(Number_guessing_game/image/download.jpg);
  }

我无法在比例图像上显示指针图像。 我应该怎么做才能显示指针图像,请告诉 这有什么错误吗?

最佳答案

您缺少 z-index,顶部的值应该更高。

关于css - 无法在 div 中的另一个图像上显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17049243/

相关文章:

html - 方向为 : column but multi-column stack by-side 的 Flexbox

HTML 表格使单元格高度适合内容 valign top

css - 推特、YouTube 等的网站 Logo

c# - 如何在 C# 中将具有 32 位颜色质量的位图图像转换为 16 位颜色质量

python - 相机标定,像素方向反投影

css - LESS:如何在不处理的情况下包含(连接)css 文件?

html - 作为 div 扩展 html css 的响应页面高度

javascript - 动态水平滚动

html - 如何使转换后的元素出现在定位元素上?

html - 背景图像显示图像的特定部分