How to use the hotspot in HTML

This article will explain in detail about the use of hotspots in HTML. Xiaobian feels very practical, so share it for everyone to do a reference, I hope everyone can gain something after reading this article.

The mark is mainly used for the image map, and can be set in the image map (also known as hotspot) in the image map, so that when the user’s mouse moves to the specified role area, Auto link to a pre-set page. The basic syntax structure is as follows:

    


Class and ID: It is a type and ID number that specifies a hot spot, respectively.
Alt: Alternative text used to set hotspots.
HREF: Used to set the URL address linked to the hotspot.
Shape and Coords: It is two main parameters for setting the shape and size of the hotspot. Its basic usage is as follows:


 The shape of the set hot spot is rectangular, the upper left corner coordinates are (x1, y1), the upper right corner vertex coordinate is (x2 Y2).  Indicates that the shape of the set hotspot is circular, the center coordinate is (x1, y1), the radius is R.  Indicates that the shape of the set hotspot is a polygon, and the vertex coordinates are (x1, y1), (x2, y2), (x3, y3) .......   Note: X1, Y1, X2, Y2 The position of these points is based on the picture, not based on the size of the window.  
The marker is divided in the image map, so its divided action area must be in the area of ​​the image map, so it must be used with HTML before dividing the area with the

mark. Mark
sets the role of the image map, and sets the name for the specified image map, which is simple, that is,
. By an example, the usage of these two markers is used: Here is a picture of a new bookshelf. The effect to do is: When the book is “URL Daquan” this book, open a window, showing the introduction of this book and the web page of the order (Urlall.htm); When the mouse point “Website Design Raiders”, open a window, showing the introduction of this book and the website of the order (SiteAll.htm); when the mouse point “Web Tips” this book, new open A window showing the introduction of this book and an order of the page (pagejqlal.htm). Method:

1, insert the picture, and set the relevant parameters of the image, and set parameters useMAP = “Newbook” in the
tag to indicate a reference to the image map;

2, with the
to mark the role area of ​​the image map, named: newbook;
3, separately by
tagged to three books A rectangular effect area and set its link parameter href.
The source code of this example is as follows:



 新书架  Several points should be noted when making this paper: 这里收集十万多个网址。 网站设计师的启蒙读本。 1, do not forget to set UseMap, ISMAP parameters, and UseMap parameter values Must be the same as the NAME parameter value in the 网页制作者不可不读的书。 tag, that is, the "image map name" is consistent;   2, all of the hotspot regions in the same "image map" must range in the image map Inside, all 
marks must be between and

;

3, the coordinate format set in the mark set is set to the Shape parameter. The shape is supported in the shape of the region, avoiding the rectangular effect area set by the Shape parameter, and the phenomenon of setting the vertex coordinates of the polygon area in Cords appears. HTML and XHTMLDifference

In HTML, the element does not need to end the label. But XHTML, element must be closed correctly.

About the use of hotspots in HTML, sharing here, I hope that the above can help everyone, you can learn more. If the article is good, you can share it out to let more people see.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment