質問

私は絶対位置決め、CSS変換、およびCSS遷移に大きく依存する開発しているWebアプリを持っています。

マークアップ:

<div class="wrapper">
    <div class="background" ></div>
    <div class="foreground" >
        <div class="image" ></div>
    </div>
</div>​
.

私のCSS

.wrapper{
    -webkit-perspective: 1600;
    -webkit-perspective-origin-y: 30%;
    height: 500px;
    width: 100%;
}

.background{
    position: absolute;
    background-size: 100% 100%;
    background-image: url("http://farm9.staticflickr.com/8321/8038059897_403c567211.jpg");
    background-color: transparent;
    position: absolute;
    width: 100%;
    height: 300px;
    bottom: 0;
    pointer-events: none;
    -webkit-transform:translate3d(0px,0px,0px);
}

.foreground{
    position: absolute;
    top: 5%;
    bottom: 5%;
    left: 5%;
    right: 5%;
    -webkit-transform: rotateY(25deg);
}

.foreground .image{
    background-image: url("http://farm7.staticflickr.com/6139/6198476123_754eaa1920_m.jpg");
    position: absolute;
    background-size: 100% 100%;
    min-width: 100%;
    min-height: 100%;
    -webkit-transform:translate3d(0px,10px,0px);
}
.

http://jsfiddle.net/kjg3f/24/ のアクションで確認できます。

Safari(デスクトップとiOSの両方)の例を見ると、前景画像が背景によって切り取られていることがわかります。しかし、クロムでは正しく機能しているようです。

背景からのtranslate3d()を削除すると、レンダリングが行われるように見えますが、Translate3D()がアニメーションの目的でそこにあるように必要です。

プリエンプティブ助けてくれてありがとう。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top