HTML syntax--using image mapping

Source: Internet
Author: User

1 What is image mapping
The so-called image mapping refers to the definition of a number of areas in a map, each region specifies a different hyperlink, when you click a different area can jump to the corresponding target page.
2 Creating an image map
2.1 Defining a map area
Define a map area use the map marker to add a map area between <MAP> and </MAP>. Add a map region using the area marker. The marker has three basic properties:
href identifies the URL of the destination
Shape describes the shapes of the mapped area. Value but:
Rect rectangle
Circle Circle
Poly Polygon
The default entire image area Coords is used to identify the boundaries of the mapped area.
2.2 Referencing a mapped region
Once the map region is marked, you can refer to the corresponding mapping information by using the UserMap property in the IMG tag.
A complete image mapping syntax is as follows:
<map name= "mymap" >
<area href=url1 shape=rect coords= "X1,y1,x2,y2" >
<area href=url2 shape=circle coords= "X,y,r" >
<area href=url3 shape=poly coords= "x1,y1,x2,y2,..., Xn,yn" >
</map>
usemap=#mymap>//Note that there is a # number in front of the name.
Note:The value of the name attribute in the map marker must be the same as the value of the Usemap property in the IMG tag, except that the value of the Usemap property is preceded by a #.

HTML syntax-using image mapping

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.