z-axis का उपयोग करके एलिमेंट को ट्रांसफॉर्म करने के लिए translateZ(z) मेथड का उपयोग करें।
आइए सिंटैक्स देखें:
translateZ(z)
यहां,
z: यह ट्रांसलेटिंग वेक्टर के z-component को दर्शाने वाली लंबाई है।
आइए एक उदाहरण देखें:
div { width: 40px; height: 40px; background-color: black; } .trans { transform: perspective(400px) translateZ(100px); background-color: orange; }