-1
첫 번째 클래스가 두 번째 클래스보다 가까워 지도록 z 인덱스 순서를 얻으려고합니다.CSS Z- 색인 문제
그러나 나는 내 인생에 박스 그림자를 보여줄 수 없다.
.title {
background-image: linear-gradient(bottom, rgb(249,252,249) 33%, rgb(255,255,255) 37%);
background-image: -o-linear-gradient(bottom, rgb(249,252,249) 33%, rgb(255,255,255) 37%);
background-image: -moz-linear-gradient(bottom, rgb(249,252,249) 33%, rgb(255,255,255) 37%);
background-image: -webkit-linear-gradient(bottom, rgb(249,252,249) 33%, rgb(255,255,255) 37%);
background-image: -ms-linear-gradient(bottom, rgb(249,252,249) 33%, rgb(255,255,255) 37%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.33, rgb(249,252,249)),
color-stop(0.37, rgb(255,255,255))
);
box-shadow: 0px 1px 5px rgba(0,0,0,1);
height: 50px;
z-index: 1;
}
.banner {
background-image:url('images/grad.jpg');
background-color:#cccccc;
height: 500px;
z-index: -1;
}
그러나 이것은 나를 위해 작동하지 않습니다.
마크 업>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Design Test | PolyDevs</title>
<link rel="stylesheet" type="text/css" href="style.css">
<div class="header">
<div class="title">
<div class="logo">
<img src="images/banner.png"/>
</div>
</div>
</div>
</head>
<body>
<div class="banner">
</div>
</body>
</html>
HTML을 게시하십시오. –
마크 업 (HTML)을 공유 할 수 있습니까? 'z-index'는 [상대적으로 설정]되어 있습니다 (http://stackoverflow.com/questions/7482840/z-index-order-for-draggable-div/7482870#7482870) 마크 업 문제는 ... –
부모 배너의 요소는'position : relative'로 설정되어 있습니까? 나는 그것이 과거에 나를 트립되었음을 안다. – aviemet