您可以尝试运行以下代码来实现transform- style 属性
示例实时演示
<!doctype html><html> <head> <style> .demo1 { width: 300px; height: 300px; background-color: yellow; } .demo2 { width: 200px; height: 200px; background-color: orange; } .demo3 { width: 100px; height: 100px; background-color: blue; transform: rotate(10deg); transform-origin: 30% 40%; transform-style: preserve-3d; } </style> </head> <body> <h1>rotation</h1> <div class = "demo1">demo <div class = "demo2">demo <div class = "demo3"> demo </div> </div> </div> </body></html>
以上就是css 中转换样式属性的使用的详细内容。
