我正在尝试像这样http://jsfiddle.net/4mFLL/
旋转2个div<!DOCTYPE html>
<html>
<head>
<style>
.psd {
position: absolute;
height: 0px;
width: 400px;
perspective: 700px;
-webkit-perspective: 700px;
-moz-transform: perspective(700px);
}
.foo {
position: absolute;
display: table;
height: 50px;
width: 100%;
background: #F00;
transform-style: preserve-3d;
transform-origin: top;
transform: rotateX(-20deg);
-webkit-transform-style: preserve-3d;
-webkit-transform-origin: top;
-webkit-transform: rotateX(-20deg);
-moz-transform-style: preserve-3d;
-moz-transform-origin: top;
-moz-transform: rotateX(-20deg);
}
</style>
</head>
<body>
<div style="position: fixed;">
<div class="psd">
<div class="foo">
<p>Text 1</p>
<div class="foo">
<p>Text 2</p>
</div>
</div>
</div>
</div>
</body>
</html>
它适用于Chrome,但不适用于Firefox。 firefox不支持这种旋转,还是我错过了css属性?
布斯蒂
答案 0 :(得分:0)
将.foo样式更改为:
.foo {
display: block;
}