0
두 이미지가 나란히 있습니다. 목표는 사용자가 마우스를 가리키면 펼치고 천천히 페이드 인 (div에 포함되는 동안)입니다. 마우스를 가져 가면 마우스를 원래 상태로 되돌릴 수 있습니다.CSS 전환 눈금/불투명도 호버 호환성
Firefox에서 잘 작동합니다. Chrome 및 Safari에서 마우스 오버 영역을 떠날 때 불투명도가 1에서 0.4로 완화되는 대신 0.4로 다시 스냅됩니다 (Firefox에서 완벽하게 작동 함). 내가 놓친 게 있니?
편집/참고 : 불투명도는 스케일링 이미지보다 빠르게 사라질 필요가 있습니다. 당신이 당신의 전환에서 두 개의 서로 다른 CSS 속성을 가리키는 것 같은
#img-wrapper {
width: 1100px;
margin: 0 auto;
position: relative;
height: 550px;
}
.footer-btn a {
font-weight: bold;
line-height: 63px;
text-decoration: none;
text-transform: uppercase;
color: #fff;
}
.footer-btn {
position: absolute;
z-index: 9000;
margin-top: 240px;
-moz-box-sizing: border-box;
background-color: #000;
height: 63px;
width: 400px;
right: 0;
left: 0;
margin-right: auto;
margin-left: auto;
}
.box {
width: 550px;
height: 550px;
text-align: center;
overflow: hidden;
float: left;
}
.box img {
width: 556px;
height: 556px;
padding: 0px;
overflow: hidden;
position: relative;
}
.footer-box {
display: table;
max-height: 550px;
position: absolute;
z-index: 9000;
}
.footer-box .blog {
height: 556px;
-webkit-transition: all 10s, opacity 5s;
-moz-transition: all 10s, opacity 5s;
-o-transition: all 10s, opacity 5s;
-ms-transition: all 10s, opacity 5s;
transition: all 10s, opacity 5s;
opacity: .4;
}
.footer-box:hover .blog {
cursor: pointer;
height:556px;
width: 556px;
transform:scale(1.15);
-ms-transform:scale(1.15); /* IE 9 */
-moz-transform:scale(1.15); /* Firefox */
-webkit-transform:scale(1.15); /* Safari and Chrome */
-o-transform:scale(1.15); /* Opera */
opacity: 0.9;
}
<div id="img-wrapper">
<div class="footer-box">
<div class="box">
<div class="footer-btn"><a class="btn" href=''>Button Text</a></div>
<img class="blog" src="images/footer-splash-left.jpg" alt="">
</div>
</div>
<div class="footer-box" style="right:0px;">
<div class="box">
<div class="footer-btn"><a class="btn" href=''>Button Text</a></div>
<img class="blog" src="images/footer-splash-right.jpg" alt="">
</div>
</div>
</div>
감사 :
는 여기에 바이올린입니다. 나는 불투명도가 스케일보다 빨리/벗어날 수 있어야한다고 언급하는 것을 잊어 버렸다. 그게 나를 위해 까다로운 일입니다. – user2953249
div에 이미지를 래핑하고 불투명도를 부여하여 .footer-box에서 실행 시키면 작동합니다. 불투명도 스타일을 제거하고이를 opacityWrapper라는 클래스에 추가했습니다. 여기에 바이올린이 있습니다. http://jsfiddle.net/MathiasaurusRex/q3RNS/ –
감사합니다. 나는 내 문제가 모든 것을 함께 묶어 두려고 노력하고 있었다고 생각한다. 이것은 완벽하게 작동합니다! 명성!! – user2953249