K
K
Kooper_pro2018-03-03 11:58:26
css
Kooper_pro, 2018-03-03 11:58:26

How to overlay multiple layers in html on top of each other?

Hello! how to overlay multiple images on top of each other in html? There are 4 images with an alpha channel and the same size, so how can I combine them all into one? How it is better to implement it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2018-03-03
@Morpheus_God

each div that you want to put on top of each other has a
position: relative property
and look towards the z-index, with it you can overlay pictures one on one. Just set the order.

A
Adam Sulumov, 2018-03-03
@Ceekjee

<style>
  .img-wrap {
    position: relative;
  }
  .img-wrap img {
    position: absolute;
  }
</style>
<div class="img-wrap">
  <img src="Ссылка на картинку" alt="">
  <img src="Ссылка на картинку" alt="">
  <img src="Ссылка на картинку" alt="">
  <img src="Ссылка на картинку" alt="">
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question