我在 safari 的代码遇到了一个奇怪的问题。
我创建了一个 jsbin,问题也在那里:http: //jsbin.com/aseced/8/edit
Safari 版本:5.1.7
你能看看吗?谢谢
TJL
编辑:
鼠标悬停时,标题应该下降(css3 rotateX 和透视)。但只有第一个动画它纠正了所有其他的只是显示(如显示:块 - 无)
这是我在 JSBin 上演示的代码:(我只是将鼠标悬停时打开的类添加到文章中)HTML:
<article class="tile2x1">
<img src="http://www.placehold.it/460x220" />
<section class="caption" style="background-color: #">
<header>
<h5>www.opten.ch</h5>
</header>
<a href="http://opten.ch" title="www.opten.ch">
www.opten.ch
</a>
</section>
</article>
<article class="tile2x1">
<img src="http://www.placehold.it/460x220" />
<section class="caption" style="background-color: #">
<header>
<h5>www.opten.ch</h5>
</header>
<a href="http://opten.ch" title="www.opten.ch">
www.opten.ch
</a>
</section>
</article>
<article class="tile2x1">
<img src="http://www.placehold.it/460x220" />
<section class="caption" style="background-color: #">
<header>
<h5>www.opten.ch</h5>
</header>
<a href="http://opten.ch" title="www.opten.ch">
www.opten.ch
</a>
</section>
</article>
CSS:
[class*="tile"] {
margin: 10px;
position: relative;
float: left;
background-color: #e53b24;
}
.tile2x1 {
height: 220px;
width: 460px;
}
[class*="tile"] > section.caption {
padding-top: 20px;
width: 100%;
position: absolute;
top: 0px;
left: 0px;
background-color: #7ab73e;
display: inline-block;
transform-origin: top;
-o-transform-origin: top;
-moz-transform-origin: top;
-webkit-transform-origin: top;
transform: perspective( 600px ) rotateX( -91deg );
-o-transform: perspective( 600px ) rotateX( -91deg );
-moz-transform: perspective( 600px ) rotateX( -91deg );
-webkit-transform: perspective( 600px ) rotateX( -91deg );
transition: all .15s linear;
-o-transition: all .15s linear;
-moz-transition: all .15s linear;
-webkit-transition: all .15s linear;
backface-visibility: hidden;
-webkit-backface-visibility: hidden; /* Chrome and Safari */
-moz-backface-visibility: hidden; /* Firefox */
-ms-backface-visibility: hidden; /* Internet Explorer */
}
[class*="tile"].open > section.caption {
transform: perspective( 600px ) rotateX( 0deg );
-o-transform: perspective( 600px ) rotateX( 0deg );
-moz-transform: perspective( 600px ) rotateX( 0deg );
-webkit-transform: perspective( 600px ) rotateX( 0deg );
}
[class*="tile"] > section.caption header {
padding-bottom: 5px;
font-size: 18px;
text-transform: uppercase;
color: #fff;
font-weight: 100;
line-height: 22px;
margin: 0 20px;
border-bottom: 1px solid #fffffd;
}
[class*="tile"] > section.caption > a {
margin: 0 20px;
line-height: 34px;
color: #fff;
font-weight: bold;
display: block;
}