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 - ondragenter 속성 - 드래그 한 요소가 드롭박스에 들어갈 때 실행 (= ondragen…
attribute HTML - ondragleave 속성 - 드래그 한 요소가 드롭박스 이탈 시 실행 (= ondragleav…
attribute HTML - ondragover 속성 - 드래그 한 요소가 드롭박스 위에 위치 시 실행 (= ondragov…
attribute HTML - ondragstart 속성 - 드래그 시작 시 실행 (= ondragstart속성 = 온드래그스…
attribute HTML - ondrop 속성 - 드래그 한 요소를 드롭 할 때 실행 (= ondrag속성 = 온드래그속성)…
attribute HTML - ondurationchange 속성 - 재생시간 데이터가 변경될 때 실행 (= onduratio…
attribute HTML - onemptied 속성 - 미디어 소스가 비어있거나 삭제된 경우에 실행 (= onemptied속…
attribute HTML - onended 속성 - 미디어 재생 끝날 때 실행 (= onended속성 = 온엔디드속성) ※ …
attribute HTML - onerror 속성 - 미디어파일 로딩 에러 시 실행 (= onerror속성 = 온에러속성) ※…
attribute HTML - onfocus 속성 ★ - 포커스 설정 시 실행 (= onfocus속성 = 온포커스속성) ※ o…
attribute HTML - onhashchange 속성 - 링크 해시값 변경 시 실행 (= onhashchange속성 = …
attribute HTML - oninput 속성 ★ - 사용자 입력값 변경 시 바로 실행 (= oninput속성 = 온인풋속…
attribute HTML - oninvalid 속성 - 유효하지 않은 입력값 제출 시 실행 (= oninvalid속성 = 온…
attribute HTML - onkeydown 속성 - 키보드키 내려갈 때 실행 (= onkeydown속성 = 온키다운속성)…
attribute HTML - onkeypress 속성 - [페기예고] 키보드키 눌렀을 때 실행 (= onkeypress속성 …
16/24
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 2
웹유틸
회원센터
홈짱닷컴 PC버전 로그인