将图像按钮放置在背景图像上

时间:2020-02-05 09:13:26

标签: c# asp.net webforms

我有一个新项目,要求我使用c#创建一个包含地图背景图像的Web表单,并且必须在特定城市中创建热点。单击一个点,我需要打开一个带有一些信息的弹出消息框。 我正在考虑将图像按钮放在背景图像上方的特定位置。

有没有办法做到这一点? Webforms的设计模式不利于将图像放置在特定位置。

1 个答案:

答案 0 :(得分:0)

您可以将图片映射用作波纹管

<img src="workplace.jpg" alt="Workplace" usemap="#workmap">

<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
  <area shape="circle" coords="337,300,44" alt="Coffee" href="coffee.htm">
</map>

Ref = https://www.w3schools.com/html/html_images_imagemap.asp

相关问题