프로그래밍
유틸리티
기타자료
시험자료
유용한사이트
대화
여행
 
 
 
 프로그래밍(Programming)
 유틸리티(Utility)
 기타자료(ETC)
 시험자료(Exam)
 유용한사이트(Site)

 
 대화(Community)
 여행(Travel)

 
 회원가입
 로그인
 접속자 31

 
프로그래밍(Programming)

[스크립트] 간단한 레이어 구조, z-index

페이지 정보

작성자 관리자 작성일15-07-16 08:16 조회2,914회 댓글0건



  • 이전글
  • 다음글
  • 목록

본문

<html>
<head>
  <script language=JavaScript>
    function z_arg()
    {
      layer1.style.zIndex = "2";
      layer2.style.zIndex = "1";
    }

    function z_arange()
    {
      layer1.style.zIndex = "1";
      layer2.style.zIndex = "2";
    }
  </script>
</head>
<body>
  <div id="layer1" style="width:200px; height:200px; position:absolute; left:10px; top:51px;  background-color:#FFFF00; z-index:2;" onclick="z_arg()">
  aaaaa
  </div>
  <div id="layer2" style="width:200px; height:200px; position:absolute; left:30px; top:100px; background-color:#00FFFF; z-index:1;" onclick="z_arange()">
  zzzzz
  </div>
</body>
</html>

댓글목록

등록된 댓글이 없습니다.

  • 이전글
  • 다음글
  • 목록
 

 
코스트프리소개
제휴안내
이용약관
개인정보 취급방침
이메일주소 무단수집거부
Copyright ⓒ 2009-2015 Costfree.co.kr All Rights Reserved.
오늘 1,060    어제 1,764    최대 2,939    전체 905,401