ie11下translateZ无效该如何解决?

先上代码:

<div class="container">
    <div class="front side">正</div>
    <div class="back side">反</div>
</div>
body{    perspective: 800px;
}.container{    transform-style:preserve-3d;    position: absolute;    left: 100px;    top: 50px;
}.side{    width: 1000px;    height: 500px;    position: absolute;
}.front {    transform: translateZ(10px);    background: red;
}.back{    transform: translateZ(-10px);    background: yellow;
}

然后是结果:
chrome下

https://img1.mukewang.com/5ba1b63800011b4e10440528.jpg

ie11下

https://img4.mukewang.com/5ba1b64200015a0e10240521.jpg

如何让ie11和chrome一致呢


小唯快跑啊
浏览 1080回答 1
1回答

侃侃无极

ie不支持 transform-style: preserve-3d;可以container中加一个 perspective: 800px;
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript