Home > Web Front-end > HTML Tutorial > img usemap attribute China map link_HTML/Xhtml_web page production

img usemap attribute China map link_HTML/Xhtml_web page production

WBOY
Release: 2016-05-16 16:42:54
Original
2558 people have browsed it

The img tag of html: defines an image to be introduced in the web page. It also has a usemap attribute that is very interesting.
Look at the map on the homepage of 51ditu, and there is a map of China in the middle. Right-click to download and take a look at an ordinary picture.
But clicking on a province on the map can trigger different events (or open different links), which is very interesting. It turns out that the usemap attribute is used.
Of course you also need to define a map tag. The entire code is as follows:





Tip: You can modify part of the code before running
For the meaning of several attributes of the area tag in the map tag, please see: http://www.w3school.com.cn/tags/tag_area.asp

It is better to note down the shape attribute of the area here, which is optional. There are rectangles, circles and polygons. Special attention should be paid to the coords attribute, which must be used in conjunction with shape. The coordinates of the upper left corner of the image are "0,0".
Related labels:
img
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