

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Usage of CSS perspective property
To specify the perspective on how 3D elements are viewed, use the CSS perspective property.
You can try to run the following code to work with perspective property:
Example
<!DOCTYPE html> <html> <head> <style> .demo1 { position: relative; width: 150px; height: 150px; background-color: yellow; perspective: 80px; margin: 50px; } .demo2 { position: absolute; padding: 20px; background-color: orange; transform-style: preserve-3d; transform: rotateX(45deg); } </style> </head> <body> <h1>Rotation</h1> <div class = "demo1">Demo <div class = "demo2">Demo</div> </div> </body> </html>
- Related Questions & Answers
- CSS perspective-origin property
- Usage of CSS visibility property
- Usage of CSS grid property
- Perform Animation on CSS perspective property
- Perform Animation on CSS perspective-origin property
- Usage of background property in CSS
- Usage of font property in CSS
- Usage of direction property in CSS
- Usage of color property in CSS
- Usage of border property with CSS
- Usage of width property with CSS
- Usage of height property with CSS
- Usage of CSS border-collapse property
- Usage of CSS caption-side property
- Usage of CSS empty-cells property
Advertisements