<map> 標籤
| 起始標籤 | 結束標籤 |
|---|---|
| 需要 | 需要 |
<area> 標籤
| 起始標籤 | 結束標籤 |
|---|---|
| 需要 | 不需要 |
<area> 的屬性如下
| 屬性 | 值 | Deprecated or Obsolete |
|---|---|---|
| accesskey | HTML 4 only, Obsolete in HTML5 | |
| alt | ||
| coords | 範圍位置座標 | |
| href | 連結網址 | |
| name | 名稱 | |
| nohref | HTML 4 only, Obsolete in HTML5 | |
| shape | rect circle poly default | |
| tabindex | HTML 4 only, Obsolete in HTML5 | |
| target | _self _blank _parent _top | |
| type |
舉例如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
<map name="demo">
<area shape="rect" coords="0, 0, 250, 187" href="mapdemo01.html">
<area shape="rect" coords="250, 0, 500, 187" href="mapdemo02.html">
<area shape="rect" coords="0, 187, 250, 375" href="mapdemo03.html">
<area shape="rect" coords="250, 187, 500, 375" href="mapdemo04.html">
</map>
<object type="image/jpg" usemap="#demo" width="500" height="375" data="example.jpg" />
載入失敗....
</object>
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:mapexample01.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->此例中,我們將 500×375 的圖片分成四個區域,分別連結到四個不同的檔案,圖檔需要用 <object> 載入。利用瀏覽器 (broswer) 開啟,首先看到圖片

點擊圖片右上方的區域,就連結到 mapdemo02.html

mapdemo01.html 原始碼如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
您點擊了圖片的左上方...<br />
<a href="mapexample01.html">上一頁</a>
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:mapdemo01.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->mapdemo02.html 原始碼如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
您點擊了圖片的右上方...<br />
<a href="mapexample01.html">上一頁</a>
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:mapdemo02.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->mapdemo03.html 原始碼如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
您點擊了圖片的左下方...<br />
<a href="mapexample01.html">上一頁</a>
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:mapdemo03.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->mapdemo04.html 原始碼如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
您點擊了圖片的右下方...<br />
<a href="mapexample01.html">上一頁</a>
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:mapdemo04.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->| 中英文術語對照 | |
|---|---|
| 行內元素 | inline element |
| 瀏覽器 | broswer |
| 屬性 | attribute |
您可以繼續參考
相關目錄
HTML 4.01 快速導覽 - 目錄
HTML, CSS 教材
首頁
參考資料
http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#the-map-element
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#the-area-element
https://developer.mozilla.org/en/HTML/Element/map
https://developer.mozilla.org/en/HTML/Element/area
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#the-map-element
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#the-area-element
https://developer.mozilla.org/en/HTML/Element/map
https://developer.mozilla.org/en/HTML/Element/area
沒有留言:
張貼留言