728x90
๋ฐ์ํ
- img ํ๊ทธ ์์ฑ์ผ๋ก usemap์ ์ง์ (id์ ์ ์ฌ)
usemap='#*' - ์ด๋ฏธ์ง ์์น ์๊ด์์ด mapํ๊ทธ๋ฅผ ๊ธฐ์ . mapํ๊ทธ ์ name ์์ฑ์ ๋งต์ ์ง์ ํ ์ด๋ฏธ์ง์ usemap์ '#'์์ด ๊ธฐ์ .
- mapํ๊ทธ(์ ๋ง๊ฐํ๊ทธ) ์ฌ์ด์ areaํ๊ทธ ๊ธฐ์ . ํ์์์ฑ์ผ๋ก shape='๋ํ์ด๋ฆ:rect/circle/poly/default',
coords='์์น์ขํ๊ฐ'
- shape์์ฑ๊ฐ : default๋ ์ ์ฒด, poly๋ ๋ค๊ฐํ
- coords๋ฅผ ์ง์ ํ ๋ :
์ฌ๊ฐํ(rect) - ์์ข ๊ผญ์ง์ ์ x์ขํ, y์ขํ, ํ์ฐ ๊ผญ์ง์ ์ x์ขํ, y์ขํ
์(circle) - ์ฐจ๋ก๋ก x์ขํ, 4์ขํ, ๋ฐ์ง๋ฆ(๊ธธ์ด)
๋ค๊ฐํ(poly) - ๊ผญ์ง์ ๋ค์ x์ขํ, y์ขํ ๋์ด
ํ์ฉ <areaํ๊ทธ>
- href ์์ฑ - ํด๋ฆญ์ ๋งํฌ ์ด๋
- onClick ์์ฑ - JS๋ฑ์ ๋์์ํ
์์

๋ค๊ฐํ์ผ๋ก ์ผ๊ฐํ ์์ญ ๋ง๋ค๊ธฐ
<area shape="poly" coords="100, 50, 50, 100, 150, 100" alt="Cup of coffee" href="coffee.htm">โ

์ฌ๊ฐํ, ์ ์์ญ ๋ง๋ค๊ธฐ
<img src="workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
<area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
<area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>โ

์ด๋ฏธ์ง์ ํด๋ฆญ ์์น์ ๋ฐ๋ผ ๋ค๋ฅธ ๋งํฌ๋ฅผ ๊ฑธ ์ ์๋ค.
728x90
๋ฐ์ํ
'studies > Front-end' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[HTML/Javascript] Iframe ํ์ฉ (0) | 2020.02.15 |
---|---|
[Javascript] ํด๋น ํด๋์ค์ ์์๋ฅผ ์ผ๊ด ๋์์ํค๊ธฐ / ์์ฃผ์ฐ์ด๋ ๋ฌธ๋ฒ ์ ๋ฆฌ (0) | 2020.02.15 |
[HTML] block๊ณผ inline ์์ฑ ํ๊ทธ ์ ๋ฆฌ (0) | 2020.02.14 |
[HTML] ํ ์ด๋ธ ํ ๋๋ฆฌ ํ ์ค๋ก ์ง์ & ๋์ค ํ ๋๋ฆฌ ๊ฐ๊ฒฉ ์กฐ์ (0) | 2020.02.14 |
[HTML] img ํ๊ทธ์ alt ์์ฑ (0) | 2020.02.14 |