Example of using UserMap in IMG

Example of using UserMap in IMG
usemap is an attribute of the <img> tag, used to specify the name of the image map to be used.

The Map in the #Map section is an image map defined with the <map> tag. Its name attribute is Map, which is defined as follows:

Copy code
The code is as follows:

<map name="Map">
<area shape=rect coordinates="100,100,200,200" href="test1.html">
<area shape=rect coordinates="200,100,300,200" href="test2.html">
...
</map>

When using:

Copy code
The code is as follows:

<img src="test.gif" usemap="#Map">

The image map divides an image into several areas. Clicking on different areas will lead to different pages.

In order to create a client image, a new attribute USEMAP needs to be added as follows:

Copy code
The code is as follows:

<IMG SRC="map_name.gif" USEMAP="#section_name">

The USEMAP attribute (use image) accepts a block-style hyperlink, so that image definition information can be stored in the same HTML file.

Copy code
The code is as follows:

<IMG src="Images/index-top.jpg" border="0" usemap="#Map" id="IMG1" onclick="return IMG1_onclick()">
<MAP name="Map">
<AREA shape="rect" coords="224,95,307,125" href="default.aspx">
<AREA shape="rect" coords="326,96,407,123" href="Cart.aspx">
<AREA shape="rect" coords="426,96,503,125" href="MemberShip/UserLogin.aspx">
<AREA shape="rect" coords="525,96,609,125" href="Admin/default.aspx">
</MAP>

<<:  Several methods to solve the problem of MySQL fuzzy query index failure

>>:  Detailed explanation of Cgroup, the core principle of Docker

Recommend

Mysql master-slave synchronization Last_IO_Errno:1236 error solution

What is the reason for the Last_IO_Errno:1236 err...

MySQL slow query operation example analysis [enable, test, confirm, etc.]

This article describes the MySQL slow query opera...

Organize the common knowledge points of CocosCreator

Table of contents 1. Scene loading 2. Find Node 1...

Simply understand the writing and execution order of MySQL statements

There is a big difference between the writing ord...

HTML Editing Basics (A Must-Read for Newbies)

Open DREAMWEAVER and create a new HTML. . Propert...

CSS web page responsive layout to automatically adapt to PC/Pad/Phone devices

Preface There are many devices nowadays, includin...

Use CSS3 to implement button hover flash dynamic special effects code

We have introduced how to create a waterfall layo...

Angular Dependency Injection Explained

Table of contents Overview 1. Dependency Injectio...

MySql grouping and randomly getting one piece of data from each group

Idea: Just sort randomly first and then group. 1....

How to use Docker containers to implement proxy forwarding and data backup

Preface When we deploy applications to servers as...

MySQL 5.7.17 installation graphic tutorial (windows)

I recently started learning database, and I feel ...

Detailed explanation of the error problem of case when statement

Preface In the MySQL database, sometimes we use j...

Docker image loading principle

Table of contents Docker images What is a mirror?...

Example usage of Linux compression file command zip

The ".zip" format is used to compress f...