<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>test</title>
<style type="text/css">
</style>
</head>
<body>
<h2>Image Maps</h2>
<p>Click on the computer, the phone, or the cup of coffee to go to a new page and read more about the topic:</p>
<img src="workplace.jpeg" alt="Workplace" usemap="#workmap" width="400" height="379">
<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="Cup of coffee" href="coffee.htm">
</map>
</body>
</html>这是来自w3schools.com的地图图像的w3schools.com。我想用鼠标在这些区域上空显示一条彩色的边界。
理想情况下,从html本身,但如果它必须与css,这是好的。
有人知道怎么做吗?我尝试过使用css与area:hover {,但不知道如何使它实际工作。
发布于 2021-12-19 19:13:30
您可以使用图像映射,但也可以使用这个process...see接受的答案来解决类似的问题:
https://stackoverflow.com/questions/70414496
复制相似问题