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

Detailed explanation of scheduled tasks for ordinary users in Linux

Preface Ordinary users define crontab scheduled t...

Example of how to implement embedded table with vue+elementUI

During my internship in my senior year, I encount...

MAC+PyCharm+Flask+Vue.js build system

Table of contents Configure node.js+nvm+npm npm s...

Summary of common problems and application skills in MySQL

Preface In the daily development or maintenance o...

Detailed explanation of the TARGET attribute of the HTML hyperlink tag A

The hyperlink <a> tag represents a link poin...

Detailed steps to build a file server in Windows Server 2012

The file server is one of the most commonly used ...

Complete steps to enable gzip compression in nginx

Table of contents Preface 1. Configure gzip compr...

A brief introduction to JavaScript arrays

Table of contents Introduction to Arrays Array li...

This article will show you the basics of JavaScript: deep copy and shallow copy

Table of contents Shallow copy Deep Copy Replenis...

JavaScript implements simple calculator function

This article example shares the specific code of ...