• 把图像热区跟链接关联起来

    2007-07-20 | Tag:HTML 笔记

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://forest.blogbus.com/logs/6902403.html

    在《Sample XHTML 1.0 document》里看到图像热区也可以跟链接关联到一起,即点热区和点链接是一样的地址。看下具体的玩法。

    正常的玩法:
    =========================HTML===================================
    <img src=”dot.png” alt=”image” usemap=”#map” height=”40″ width=”40″ />
    <div> <map xml:lang=”en” dir=”ltr” id=”map” class=”map” title=”map” name=”map” lang=”en”> <area href=”#grouping.heading” id=”area” class=”area” title=”area” xml:lang=”en” dir=”ltr” shape=”rect” coords=”0,0,19,19″ alt=”Grouping elements: div and span” tabindex=”5″ lang=”en” /> <area href=”#” shape=”rect” coords=”20,0,39,20″ alt=”Headings: h1, h2, h3, h4, h5, h6″ tabindex=”6″ /> <area href=”#” shape=”rect” coords=”0,20,20,39″ alt=”Address: address” tabindex=”7″ /> <area shape=”rect” coords=”20,20,39,39″ nohref=”nohref” /> </map></div>
    ===============================================================
    关联链接:
    =========================HTML===================================
    <img src=”dot.png” alt=”image” usemap=”#map2″ height=”40″ width=”40″ />
    <div> <map xml:lang=”en” dir=”ltr” id=”map2″ class=”map” title=”map” name=”map2″ lang=”en”>
    <ul>
    <li><a href=”#” shape=”rect” coords=”0,0,19,19″>Grouping elements: div and span</a></li>
    <li><a href=”#” shape=”rect” coords=”20,0,39,20″>Headings: h1, h2, h3, h4, h5, h6</a></li>
    <li><a href=”#” shape=”rect” coords=”0,20,20,39″>Address: address</a></li>
    </ul>
    </map></div>
    ===============================================================


    收藏到:Del.icio.us




    引用地址: