覆盖两个图像/链接(html)

时间:2015-05-07 12:10:41

标签: html css

我想覆盖两个图像,每个图像是另一个页面的链接(href)。 例如,我有一个项目列表(图像),我可以点击它以获得更多信息, 每个图像我想要放置一个"比较"将我发送到另一个视图的按钮。 (我不想在项目图像附近有一个按钮,但超过此图片)

1 个答案:

答案 0 :(得分:0)

*
{
    padding: 0;
    margin: 0;
}
div
{
  margin: 10px auto 0 auto;
  width: 150px;
  position: relative;
}
img
{
  display: block;
  width: 100%;
  height: 150px;
  background: #ccc;
}
button
{
  display: block;
  margin: 0 auto;
  padding: 10px;
  position: relative;
  bottom: 50px;
}
<div>
  <img alt="Image" />
  <button>Button</button>
</div>

相关问题