작업중인 웹 사이트에 사용자 정의 배경을 구현하는 동안 이상한 문제가 발생했습니다.Z- 색인이 의사 요소에서 작동하지 않습니다.
나는 codepen에 개념 증명 코드를 작성했으며 거기에서 완벽하게 작동하지만 웹 사이트에서 구현하려고하면 그렇지 않습니다.
https://codepen.io/Hassansky/pen/eEaQxG/
당신이 볼 수
body {
background: black;
}
.background-test {
background: white;
width: 20%;
margin: 2% 50%;
height: 250px;
padding: 1%;
position: relative;
}
.background-test:before {
width: 100%;
height: 100%;
content: "";
background: red;
position: absolute;
z-index: -1;
bottom: -3%;
left: -2%;
-webkit-clip-path: polygon(2% 4%, 100% 0, 99% 97%, 0 100%);
clip-path: polygon(2% 4%, 100% 0, 99% 97%, 0 100%);
}
<div>
<div class="background-test">Lorem Ipsum</div>
<div></div>
</div>
나는 겹쳐 쌓는 문제를 찾으려고 노력했지만, 나는 끝이났다. 그리고 이것에 대한 합리적인 설명을 찾을 수 없다.
이 테마는 테마가로드 된 Wordpress 웹 사이트이지만, 특히 Z- 색인과 관련된 규칙을 찾을 수없는 경우 Z- 색인 스태킹에 문제가 없어야합니다.
페이지 URL : http://polkrys.pl/cukiernia/podklady-cukiernicze-okragle-biale/
내가 요소가 그들에 의사 요소가되어야하는 표시했습니다.
.polkrys_shadow {
position: relative;
&:before {
width: 100%;
height: 100%;
content: "";
background: red;
position: absolute;
z-index: -1;
bottom: -3%;
left: -2%;
-webkit-clip-path: polygon(2% 4%, 100% 0, 99% 97%, 0 100%);
clip-path: polygon(2% 4%, 100% 0, 99% 97%, 0 100%);
}
마진 및 패딩 워드는 비주얼 작곡가 내에 정의된다
I 문제의 소자에 관한 SASS 코드를 추가하고있다. Dev Tools를 사용하여 언급 된 요소를 검사 할 것을 제안합니다 - 을보아야합니다.이 작동해야합니다. 그러나 그렇지 않습니다.
'.logistic-bg .polkrys_shadow : { 콘텐츠 : "; 배경 : 흰색; 직위 : 절대; 왼쪽 : 0; 오른쪽 : 0; 상단 : 0; 하단 : 0; '.logistic-bg .polkrys_shadow'는'z-index : 9;'를 선언하고'.logistic-bg div : first-child'는'z-index : 99;'를 선언합니다 – UncaughtTypeError
어딘가에 - https://gyazo.com/c9efc79f9b2c5a668fdbb0fbaee2a633 – Hassan
이제'position : relative;'on'을 선언하십시오.logistic-bg div : first-child' – UncaughtTypeError