我正在尝试创建一个包含多个地图指针的地图(7)。
我已设法使用以下代码将它们置于正确的位置。
<div style="position:relative; left: 0; top: 0;">
<img src="images/JCCareas.png" class="img-responsive" style="position:relative; left: 0; top: 0;" alt="Map" />
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 375px; top: 455px;" alt="target Solihull" title="Solihull"/>
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 320px; top: 250px;" alt="target Sheldon"/>
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 490px; top: 520px;" alt="target Knowle"/>
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 290px; top: 365px;" alt="target Olton"/>
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 575px; top: 390px;" alt="target Hampton-In-Arden"/>
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 560px; top: 80px;" alt="target Coleshill"/>
<img src="images/JCCtarget.png" class="img-responsive" style="position:absolute; left: 460px; top: 215px;" alt="target Marston Green"/>
</div>
地图正在响应,但地图标记不是我在css中尝试了几种方法,但我真的很难让这个工作。
CSS我试过:
#under-image {
position: relative;
display: inline;
}
#over-image {
position:absolute;
left:33%;
top:43%;
max-width: 10%;
}
任何帮助都将不胜感激。
答案 0 :(得分:0)
尝试top
&amp; left
position
%
.img1{left: 28%;
position: absolute;
top: 49%;
}
.img2{left: 32%;
position: absolute;
top: 87%;
}