HTML element-map usage

Source: Internet
Author: User

In HTML, map labels can be used to create a hyperjoin for a part of the image. The usage is as follows:


<Map Name = "Map-name">
<Area shape = "rect | circle | poly" coords = "#" href = "url">
</Map>

The coords coordinates explain the shapes as follows:

Shape = "rect" coords = "X1, Y1, X2, Y2" // (x1, Y1) = upper left, (X2, Y2) = lower right

That is, when the shape is a rectangle, coords indicates the coordinates of the top left and bottom right (X2, Y2) of the rectangle.
Shape = "circle" coords = "X, Y, R" // (x, y) = center, r = radius

That is, when the shape is a circle, coords indicates the coordinates (x, y) and radius of the center of the circle.

Shape = "poly" coords = "X1, Y1, X2, Y2, X3, y3... "// (x1, Y1> = first corner, (X2, Y2) = second corner ,...

That is, when the shape is a polygon, coords indicates the coordinates (x1, Y1), (X2, Y2), (X3, Y3) of all vertices of the polygon )...

 

Note: All vertices above are relative to the upper left coordinate of the graphic img.gif.

 

The following is an example:


<Map Name = "face">
<Area shape = "rect" href = "page.html" coords = "140,20, 280
<Area shape = "poly" href = "image.html" coords = "100,100,180, 80,200,140">
<Area shape = "circle" href = "new.html" coords = "80,100, 60">
</Map>

Bytes -------------------------------------------------------------------------------------------------------------

HTML element-Map

Coordinate data that contains the client image ing.

Contains coordinate data for client-side image maps.

Image ing is an image with pre-defined areas that contain links to other documents or anchors. For example, you can create a user click on an image of the solar system to view links to different planets.

The map object is referenced by the usemap attribute of the IMG element. The format is as follows:

The map element contains a set of area elements that define the linked areas in the image.

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.