Home > Web Front-end > HTML Tutorial > Detailed explanation of creating image mapping of tag in html

Detailed explanation of creating image mapping of tag in html

黄舟
Release: 2017-08-11 13:33:01
Original
2425 people have browsed it

Junior front-end piece The following code is to create image mapping on the picture. I organized it myself and made a note. I hope it can also help friends who will learn later!

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
  <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
  <area shape="poly" coords="23,58,8,59,40,70" alt="Venus" href="venus.htm">
</map>
Copy after login

The shape in this code refers to the shape of the click area, and coords should refer to the coordinates of the link area in the image (in pixels).

shape
1.rectangle The coordinates are (x1, y1), the coordinates of the lower right corner vertex are (x2, y2)
2. Circle: (The center coordinate is (X1, y1), the radius is r)
3. Polygon: (each vertex The coordinates are (x1,y1), (x2,y2), (x3,y3)...)

The above is the detailed content of Detailed explanation of creating image mapping of tag in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template