有没有办法在html中的图像坐标上写文字?
<img src="img.png" width="300" height="45" usemap="#map">
<map name="map">
<area shape=""rect" coords='40,20,126,30'>
答案 0 :(得分:0)
你可以用一点CSS做到这里是一个例子:
<强> HTML:强>
<div class="img">
<img src="" alt="" />
<h4>Text you want to display on the image</h4>
</div>
<强> CSS:强>
.img {
position: relative;//make the pozition of image relative
}
h4 {
position: absolute; //and give absolute position to your text
top: 200px; //this top and left values can be taken as coordinates of image
left: 0;
}