Map Index in Web Page
In actual Web Page production, it is often encountered in the case where certain index icons in a whole image will be encountered to generate URL jumps. If we do not pass the MAP mechanism, we have to split the entire image into many small pieces of independent icons, through multiple statements to be jumped. This approach despite the actual needs of the part, but in some specific occasions, for example, through a whole China map, it is often not from the heart:
(1) It is difficult to combine each divided rectangular sub-map in Netscape to display a full "seamless" image, and the final map of the map is not ideal;
(2) The positioning of each city cannot be accurate to the "small circle" on the city;
(3) Cutting and complex statement of the image makes the production amount of the producer.
With HTML expand MAP mechanism, the above problems can be easily solved, referring to the examples below:
HEAD>
center>
Map>
Body>
Html>
In
statement, there are two key Words should specifically explain:
(1) ISMAP
This image will be used as MAP.
(2) Usemap = "# maintopmap"
Define the name of this map as MAINTOPMAP, the preamble # must.
After the extended statement defines the useMAP name, then this MAP can be used to implement a complete map index function, using the following statements:
Map>
described as follows:
(1)
(2) , indicating that if the user selects the index identifier in the rectangular area of (x1, y1) - (x2, y2) in the map image, The browser is positioned to the node illustrated by the URL.
The step of the MAP mechanism:
(1) MAP image is made with image software;
(2) Record the snap upper left corner (X1, X2) and the left upper left corner (x1, x2) and the lower right corner (x2, y2) of all hotspot rectangular regions. X and Y snorkers are opposed, (x, y) of the upper left corner of the image is the coordinate origin (0, 0), the lower right corner (x, y) = (image width -1, image height -1);
(3) Use statement in the HTML file;
(4) Add the