HTML

[attribute] HTML - usemap 속성 - 이미지를 이미지맵으로 지정 (= usemap속성 = 유즈맵속성|유스맵속성)

목차
  1. usemap 예제 - <img> 경우
  2. usemap 정의
  3. usemap 구문
  4. usemap 예제 - <object> 경우

 

usemap 예제 - <img> 경우

 

<img src="homzzang.jpg" alt="홈짱닷컴" usemap="#hz" width="200" height="200">


<map name="hz">

  <area shape="rect" coords="30,30,60,60" alt="HTML" href="html.php">

  <area shape="rect" coords="30,70,60,100" alt="CSS" href="css.php">

  <area shape="circle" coords="30,150,30" alt="JS" href="js.php">

</map>


 

usemap 정의

 

이미지를 이미지맵(= 클릭 가능 영역 가진 이미지)으로 지정.

 

  • <map> 태그의 name (또는, id) 속성과 연동시킴.
  • <img> 태그가 <a>나 <button> 요소의 자손인 경우엔 사용 불가.
  • <img> 태그 경우 - 모든 브라우저 지원.
  • <object> 태그 경우 - 파이어폭스만 지원.

 

 

usemap 구문

 

  • <img usemap="#mapname">
  • <object usemap="#mapname">

  


[속성값]

 

#mapname

<ma> 태그의 name(또는 id) 속성값 앞에 샵(#) 기호 붙임.

 

 

usemap 예제 - <object> 경우

※ Firefox 브라우저만 지원.

 

<object data="homzzang.jpg" usemap="#hz" width="200" height="200"></object>


<map name="hz">

  <area shape="rect" coords="30,30,60,60" alt="HTML" href="html.php">

  <area shape="rect" coords="30,70,60,100" alt="CSS" href="css.php">

  <area shape="circle" coords="30,150,30" alt="JS" href="js.php">

</map>

 



분류 제목
attribute HTML - onafterprint 속성 - 인쇄 대화상자 닫힌 이후 이벤트 발생 시 실행할 코드 정의 (=…
attribute HTML - onbeforeprint 속성 - 인쇄 대화상자 나타나기 이전 이벤트 발생 시 실행할 코드 정의…
attribute HTML - onbeforeunload 속성 - 사용자가 웹페이지 떠날 때 떠나기 전 실행 (= onbefo…
attribute HTML - onblur 속성 ★ - 포커스 해제 이벤트 시 실행 (= onblur속성 = 온블러속성) ※ …
attribute HTML - oncanplay 속성 - 재생 시작 가능 시 실행 (= oncanplay속성 = 온캔플레이속성…
attribute HTML - oncanplaythrough 속성 - 버퍼링 위해 멈춤 없이 전체 재생 가능 시 실행 (= o…
attribute HTML - onchange 속성 ★ - 요소값 변경 이벤트 시 실행 (= onchange속성 = 온체인지속…
attribute HTML - onclick 속성 ★ - 요소 클릭 이벤트 시 실행 (= onclick속성 = 온클릭속성) ※…
attribute HTML - oncontextmenu 속성 - 마우스오른쪽메뉴선택 시 실행 (= oncontextmenu속성…
attribute HTML - oncopy 속성 - 요소의 텍스트나 이미지 태그를 복사 시 실행 (=oncopy속성 = 온카피…
attribute HTML - oncuechange 속성 - 트랙의 큐(캡션/자막) 변경 시 실행 (= oncuechange속…
attribute HTML - oncut 속성 - 요소 내용 잘라내기 시 실행 (= oncut속성 = 온컷속성) ※ oncut…
attribute HTML - ondblclick 속성 ★ - 요소 더블클릭 이벤트 시 실행 (= ondblclick속성 = …
attribute HTML - ondrag 속성 - 드래그 이벤트 시 실행할 코드 지정 (= ondrag속성 = 온드래그속성)…
attribute HTML - ondragend 속성 - 드래그 종료 시 실행 (= ondragend속성 = 온드래그엔드속성)…
15/24
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티
웹유틸
회원센터
홈짱닷컴 PC버전 로그인