transform
UK[trænsˈfɔ:m] US[trænsˈfɔ:rm]
vt.Transform; change; change
vi.Change
n.[Number] transformation formula
style
英[staɪl] 美[staɪl]
n. Way; Style; fashionable; appearance, taste
vt. Design; name; shape for...
vi. Make it conform to popular style; use a carving knife to make decorative paintings
css transform-style property syntax
Function:The transform-style attribute specifies how to render nested elements in 3D space.
Syntax: transform-style: flat|preserve-3d
Description: flat child elements will not retain their 3D position. preserve-3d Child elements will retain their 3D position.
Note: This attribute must be used together with the transform attribute.
css transform-style property example
<!DOCTYPE html> <html> <head> <style> #div1 { position: relative; height: 200px; width: 200px; margin: 100px; padding:10px; border: 1px solid black; } #div2 { padding:50px; position: absolute; border: 1px solid black; background-color: red; transform: rotateY(60deg); transform-style: preserve-3d; -webkit-transform: rotateY(60deg); /* Safari and Chrome */ -webkit-transform-style: preserve-3d; /* Safari and Chrome */ } #div3 { padding:40px; position: absolute; border: 1px solid black; background-color: yellow; transform: rotateY(80deg); -webkit-transform: rotateY(-60deg); /* Safari and Chrome */ } </style> </head> <body> <div id="div1"> <div id="div2">HELLO <div id="div3">YELLOW</div> </div> </div> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance