2012-02-16 7 views
0

이미지 슬라이더 위에 다음 CSS div 마스크를 배치했습니다.CSS 아래의 슬라이더에 액세스 할 수있는 100 % 너비 배경 마스크

<div class="contentMaskWrapper" > 
    <div class="contentMaskLeft"></div> 
    <div class="contentMaskRight"></div> 
</div> 
<div id="slider"> 
    slider content  
</div> 

.contentMaskWrapper{ 
width:100%; 
overflow:hidden; 
position:absolute; 
z-index:3; 
height:564px; 
    } 
.contentMaskLeft{ 
background:url(../images/mask.png) repeat; 
height:564px; 
width:100%; 
position:absolute; 
left:50%; 
margin-left:425px; 
z-index:999; 
} 
.contentMaskRight{ 
background:url(../images/mask.png) repeat; 
height:564px; 
width:100%; 
position:absolute; 
right:50%; 
margin-right:425px; 
z-index:999; 
} 
#slider{ 
width:850px; 
height:564px; 
margin:0 auto 20px; 
position:relative; 
clear:both; 
overflow:hidden; 
width:100%; } 

시각적으로 올바르게 표시되는 마스크는 이미지 슬라이더의 양쪽에 위치합니다. 슬라이더에는 링크가 있으며이 링크는 FF, Safari, Chrome (Mac 또는 PC)이 아닌 IE (7+)에서만 작동합니다.

희망적입니다. 자세한 정보가 필요하면 알려주십시오. 도움을 청합니다. 감사합니다. Jamie

답변

0

이것은 분명히 두 마스크가 모두 슬라이더의 링크를 덮고 있기 때문입니다. (그들은 더 높은 z- 인덱스를 가지며 각 마스크의 여백으로 덮인 영역 만이 또한 덮음으로 계산됩니다.)

솔루션에는 여백없이 절대 위치 지정이 포함될 수 있습니다 (왼쪽 마스크는 왼쪽으로 0px, 오른쪽으로). 너는 너의 슬라이더를 마스크 위에 올려 놓으려고 할 수 있었지만 정말로 필요한 크기 (너의 경우에는 425px * 2 = 850px) 만 가지고 있었다.

0

나는 주목했다. 당신의 마스크는 당신의 미끄럼틀과 겹쳐 있습니다. 위의 슬라이더를 Z- 인덱스를 마스크보다 높게 배치하여 위치를 변경하십시오.