html - 如何设置具有定义边界的区域作为链接?
问题描述
我正在尝试做的是使用 px 在 HTML 中的图像中设置半径,其中该半径用作链接。基本上,创建用作链接的图像的一部分,而其余部分则没有。
解决方案
我相信您正在寻找图像地图。
例子:
<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>
逐字逐句取自https://www.w3schools.com/html/html_images_imagemap.asp
推荐阅读
- c# - c# - 如何仅反序列化部分xml文件
- c# - 当连接字符串在自定义配置文件中时,实体框架迁移失败
- html - 如何在边框后面创建阴影?
- cplex - 如何使用 C++ 在 Concert 技术中使用 MPS 文件
- javascript - 如何防止数组中的重复项?
- javascript - Jquery 只获取一个动态输入值而不是多个动态输入值
- android - 如何区分应用程序重新启动与应用程序从后台恢复
- javascript - React webpack 生产版本无法启动
- c# - ASP.NET Core 整洁 if/else 取决于对象是否已初始化?
- snowflake-cloud-data-platform - 雪花创建表,其中包含从 Select 语句填充的列子集