zoukankan      html  css  js  c++  java
  • map标签的详细使用参数

    map标签必须成对出现,即

    <map> ....</map>

    同时map必须和area配合使用。

    img标签里的usermap属性值必须与map标签里的id和name值完全一致

     

    area标签:定义图片的点击区域 area 是单标签,不成对。

    属性:

    accesskey 快捷键

    alt 图片提示文字

    coords 定义和点击区域的图形的坐标

    href 链接地址

    nohref 图像点击可排除的区域,当不是有href时,需要使用nohref

    shape 可点击区域的形状

    tabindex    tab键遍历

    target 链接目标

    代码实例:

    <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分别是矩形的左上角和右下角的坐标值 !>

    <area shape="circle" coords="a,b" target="_blank" href="" />

    <!-- a,b分别是圆形的圆心的坐标值 !>

    <area shape="poly" coords="a,b..." target="_blank" href="" />

    <!-- a,b分别是多边形的各个定点的坐标值 !>

    </map>

  • 相关阅读:
    restapi(6)- do it the functional way, 重温函数式编程
    JS模块化
    socket.io websocket
    CSS 文字换行
    webpack初识
    升级nodejs至最新
    JavaScript Promise迷你书(中文版)
    时间格式化
    npm yarn
    深入浅出MongoDB应用实战开发
  • 原文地址:https://www.cnblogs.com/james1207/p/3306183.html
Copyright © 2011-2022 走看看