zoukankan      html  css  js  c++  java
  • 带有可点击区域的图像映射:HTML <map> 标签

    实例

    带有可点击区域的图像映射:

    <img src="planets.jpg" border="0" usemap="#planetmap" alt="Planets" />
    
    <map name="planetmap" id="planetmap">
      <area shape="circle" coords="180,139,14" href ="venus.html" alt="Venus" />
      <area shape="circle" coords="129,161,10" href ="mercur.html" alt="Mercury" />
      <area shape="rect" coords="0,0,110,260" href ="sun.html" alt="Sun" />
    </map>
    
    <html>
    <body>
    
    <p>请点击图像上的星球,把它们放大。</p>
    
    <img
    src="/i/eg_planets.jpg"
    border="0" usemap="#planetmap"
    alt="Planets" />
    
    <map name="planetmap" id="planetmap">
    
    <area
    shape="circle"
    coords="180,139,14"
    href ="/example/html/venus.html"
    target ="_blank"
    alt="Venus" />
    
    <area
    shape="circle"
    coords="129,161,10"
    href ="/example/html/mercur.html"
    target ="_blank"
    alt="Mercury" />
    
    <area
    shape="rect"
    coords="0,0,110,260"
    href ="/example/html/sun.html"
    target ="_blank"
    alt="Sun" />
    
    </map>
    
    <p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。</p>
    
    </body>
    </html>

    注释:img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。

  • 相关阅读:
    vue --- 脚手架初始化项目中配置文件webpack.base.conf.js代码含义
    Chrome
    es8 --- 新特性
    es7 --- 新特性
    vue --- 关于多个router-view视图组件,渲染同一页面
    vue ---- 组件传值之间使用 v-model
    vue --- watch 高级用法
    js --- 递归结构图
    es6 --- Generator 函数
    es6 -- set 数据结构
  • 原文地址:https://www.cnblogs.com/liuyanxia/p/5367724.html
Copyright © 2011-2022 走看看