admin管理员组文章数量:1130349
一定要将perspective 放置在第一位,否者不生效
错误的写法如下: 会导致不产生透视效果perspective 无效
transform:rotateX(30deg) perspective(20px);
demo
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="gbk">
<style type="text/css">
.wyFirst {
width: 100px;
height: 100px;
background-color: red;
position: absolute;
left: 100px;
top: 100px;
transform:perspective(20px) rotateX(30deg) ;
}
</style>
</head>
<body>
<div class="wyFirst">this is a test</div>
</body>
</html>
一定要将perspective 放置在第一位,否者不生效
错误的写法如下: 会导致不产生透视效果perspective 无效
transform:rotateX(30deg) perspective(20px);
demo
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="gbk">
<style type="text/css">
.wyFirst {
width: 100px;
height: 100px;
background-color: red;
position: absolute;
left: 100px;
top: 100px;
transform:perspective(20px) rotateX(30deg) ;
}
</style>
</head>
<body>
<div class="wyFirst">this is a test</div>
</body>
</html>
本文标签: 在前面顺序transformperspective
版权声明:本文标题:transformperspective顺序问题,perspective需要在前面 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1758750536a2783710.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论