E
E
Evtera2020-05-14 12:08:30
css
Evtera, 2020-05-14 12:08:30

How to insert an image (svg path) on top of a background image?

Hello. There is a map, you need to hang images on it in layers by coordinates. I figured out the coordinates, but I can’t insert the image itself, how exactly to insert the image I need according to the coordinates? img/src?

<div class="map">
    <svg  viewBox="0 0 2554.6667 1066.6667">
        <path  class="map__city" d="m 599.73491,37.461951   z">
        </svg>

<--- Это фоновая картинка. На неё сверху нужно вешать слои --->
    <img  class="map__bg" src="./img/map/cleanMap.png" alt="">
  </div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Amir Davlatov, 2020-05-14
@Evtera

Via z-index. Let's say the background has z-index: 1;, and the image on top has x-index: 2;
If I understand everything correctly, then this is

D
drawnofmymind, 2020-05-14
@drawnofmymind

hmm, if so

.map{
 bacokround: url("./img/map/cleanMap.png");
background-position: 100px  100px
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question