CSS 3D perspective 속성에 문제가 있습니다.3D에서 CSS3 perspective
<figure>
<img src="http://www.saintbioz.fr/wp-content/uploads/2010/02/paysage-montagneux.jpg" width="512" height="384" alt="Landscape" />
<figcaption>Summer in the mountains</figcaption>
</figure>
I 단지에서 figcaption의 애니메이션화 할 : -90deg는 블록 평탄화 (그래서 보이지 않는) 대표 점을 감안 0deg로 -90deg에서 폴딩 다운 효과 (같은 http://davidwalsh.name/demo/folding-animation.php)을 수행 호버
/** vendor prefixes have been removed for better readability **/
figure {
display: inline-block;
position: relative;
line-height: 0;
perspective: 300px;
}
figcaption {
background-color: rgba(0,0,0,0.2);
padding: 20px 10px;
position: absolute;
top: 0;
right: 0;
left: 0;
transition-property: all;
transition-duration: 500ms;
transform: rotateX(-123deg);
transform-origin: top;
}
figure img:hover + figcaption {
transform: rotateX(0deg);
}
문제는 퍼스펙티브가 Chrome과 Firefox에서 동일한 렌더링을 제공하지 않는다는 것입니다. 퍼스펙티브 디폴트 값을 rotateX(-123deg);
으로 수동으로 설정해야합니다. 퍼스펙티브 값은 500px에 따라 다르며, Chrome에서는 잘 작동하지만 Firefox에서는 제대로 작동하지 않습니다.
이론상으로는, -90deg가 아닌 경우 : 호버, 0deg : 호버 일 때, perspective
속성이 깊이 필드의 길이를 변경하여 -90deg가 더 이상 작동하지 않는 것처럼 보입니다.
perspective
및 rotate
으로 재생할 때 모범 사례가 최근의 모든 브라우저에서 제대로 작동하도록하려면 궁금합니다.
감사합니다.
PS : 그냥, 즉시 뭐가 잘못 표시되어야 HTML & CSS를 붙여 크롬과 FF에서 그것을 시도/복사;, 나는 그것이 도움이되지 않습니다 알고)
안녕하세요, 감사 (필요가 원하는 효과를 얻을 것이다 정확한 각도를 파악 없습니다). 내 목표는 다른 사람이 상관없이 원근법으로 처리 할 수있는 브라우저에서 예상대로 작동하도록하는 것입니다. – jmpp
알림 : 2016 년입니다 .... –