css position Overlapping Elements(겹치는 요소들) > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

css position Overlapping Elements(겹치는 요소들) 정보

CSS css position Overlapping Elements(겹치는 요소들)

본문

Overlapping Elements(겹치는 요소들)

 

 

요소가 배치되면 다른 요소와 겹칠 수 있습니다.

 

이 z-index속성은 요소의 스택 순서를 지정합니다.이 요소는 다른 요소의 앞에 또는 뒤에 있어야합니다.

 

요소는 양수 또는 음수 스택 순서를 가질 수 있습니다.

 

67173ad6d54b54e261487cb56d6156e9_1491309146_4504.png
 

 

img {

    position: absolute;

    left: 0px;

    top: 0px;

    z-index: -1;

}

 

 

 

<!DOCTYPE html>

<html>

<head>

<style>

img {

    position: absolute;

    left: 0px;

    top: 0px;

    z-index: -1;

}

</style>

</head>

<body>

 

<h1>This is a heading</h1>

<img src="w3css.gif" width="100" height="140">

<p>Because the image has a z-index of -1, it will be placed behind the text.</p>

 

</body>

</html>

67173ad6d54b54e261487cb56d6156e9_1491309158_0767.png

추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로