LINUX.ORG.RU

Как напечатать текст поверх img+usemap?


0

1

Пробую так:

<style>
#calc {
  height: 700;
  background: url("images/wc.png") no-repeat;
}
</style>
<div id="calc">
<div class="c1">0</div>
<div class="c2">1</div>
<div class="c3">2</div>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
Но как подключить к этому изображению map?
<map name="map">
<area shape="rect" coords="475,124,558,145" alt="Итог" onmouseover="summa_highlight()" onclick="summa()" />
<area shape="rect" coords="383,125,402,144" alt="Добавить" onclick="c3_plus()" />
<area shape="rect" coords="403,125,422,144" alt="Уменьшить" onclick="c3_minus()" />
<area shape="rect" coords="245,125,264,144" alt="Добавить" onclick="c2_plus()" />
<area shape="rect" coords="265,125,284,144" alt="Уменьшить" onclick="c2_minus()" />
<area shape="rect" coords="105,125,124,144" alt="Добавить" onclick="c1_plus()" />
<area shape="rect" coords="125,125,144,144" alt="Уменьшить" onclick="c1_minus()" />
</map>
Единственный пусть - это использование a href с относительными left, top + width,height?

★★★★★

Ответ на: комментарий от pacify

Разобрался.

#c1 {
  position: absolute;
  top: 123px;
  left: 85px;
}
#c2 {
  position: absolute;
  top: 123px;
  left: 225px;
}
#c3 {
  position: absolute;
  top: 123px;
  left: 360px;
}
...
<div id="c1">0</div>
<div id="c2">1</div>
<div id="c3">2</div>

pacify ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.