Detailed introduction and usage examples of map tag parameters

Detailed introduction and usage examples of map tag parameters
Map tags must appear in pairs, i.e.

<map> ....</map>

At the same time, map must be used in conjunction with area.

The usermap attribute value in the img tag must be exactly the same as the id and name values ​​in the map tag.

area tag: defines the click area of ​​the image. area is a single tag, not a pair.

property:

accesskey shortcut key

alt Image hint text

coords defines the coordinates of the graphic and click area

href link address

nohref is the area that can be excluded when the image is clicked. When there is no href, nohref needs to be used

shape The shape of the clickable area

tabindex tab key traversal

target link target

Code example:

Copy code
The code is as follows:

<img src="images/logo.gif" usermap="#map"/>
<map id="map" name="map">
<area shape="rect" coords="a,b,c,d" target="_blank" href=""/>
<!-- a, b, c, d are the coordinate values ​​of the upper left corner and lower right corner of the rectangle respectively!>
<area shape="circle" coords="a,b" target="_blank" href="" />
<!-- a, b are the coordinate values ​​of the center of the circle!>
<area shape="poly" coords="a,b..." target="_blank" href="" />
<!-- a, b are the coordinate values ​​of each fixed point of the polygon!>
</map>

<<:  Flash embedded in web pages and IE, FF, Maxthon compatibility issues

>>:  Detailed steps for IDEA to integrate docker to achieve remote deployment

Recommend

A brief discussion on how Tomcat breaks the parent delegation mechanism

Table of contents JVM Class Loader Tomcat class l...

Advantages of MySQL covering indexes

A common suggestion is to create indexes for WHER...

Detailed explanation of several ways to create a top-left triangle in CSS

Today we will introduce several ways to use CSS t...

Vue+echarts realizes progress bar histogram

This article shares the specific code of vue+echa...

Problems and solutions of using jsx syntax in React-vscode

Problem Description After installing the plugin E...

How to use CSS to display multiple images horizontally in the center

Let me first talk about the implementation steps:...

Install MySQL 5.7 on Ubuntu 18.04

This article is compiled with reference to the My...

Detailed explanation of CSS3+JS perfect implementation of magnifying glass mode

About a year ago, I wrote an article: Analysis of...

Discussion on the problem of iframe node initialization

Today I suddenly thought of reviewing the producti...

CSS3 creates web animation to achieve bouncing ball effect

Basic preparation For this implementation, we nee...

8 Reasons Why You Should Use Xfce Desktop Environment for Linux

For several reasons (including curiosity), I star...

How to implement remote connection for Redis under Linux

After installing Redis on Linux, use Java to conn...

Tomcat+Mysql high concurrency configuration optimization explanation

1.Tomcat Optimization Configuration (1) Change To...