Vin*_*ent 5 html css internet-explorer rotation
我在Internet Explorer 8及更低版本中的旋转有问题.我能够旋转父div,但子(绝对定位)不会与其父级一起旋转.当我没有将孩子定位为绝对时,它会做正确的旋转.
这是我的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
.parent
{
background-color: #f00;
position: absolute;
top: 300px;
left: 300px;
width: 500px;
height: 500px;
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476, sizingMethod='auto expand'); //45deg
}
.child
{
background-color: #0f0;
position: absolute;
top: 150px;
left: 150px;
width: 300px;
height: 300px;
}
</style>
</head>
<body>
<div class="parent">
This is the parent
<div class="child">
This is the child
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
当您在IE8中查看此代码时,这就是结果
我想绿色div与红色div具有相同的旋转.
谢谢!
归档时间: |
|
查看次数: |
3742 次 |
最近记录: |