
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
How to apply a 2D or 3D transformation to an element with CSS
Apply a 2D or 3D transformation to an element with the transform property in CSS. You can try to run the following code to rotate an element using transformation
Example
<!DOCTYPE html> <html> <head> <style> div { width: 200px; height: 100px; background-color: gray; transform: rotate(10deg); } </style> </head> <body> <h1>Rotation</h1> <div>Demo</div> </body> </html>
- Related Articles
- How to apply XSL transformation on an XML document?
- How to apply two CSS classes to a single element?
- How to set a 3D element\'s base placement in CSS ?
- How to apply Affine Transformation on an image in OpenCV Python?
- How to apply a 2D convolution operation in PyTorch?
- How to apply a 2D Average Pooling in PyTorch?
- How to style an hr element with CSS?
- How to apply a 2D transposed convolution operation in PyTorch?
- How to apply a 2D Max Pooling in PyTorch?\n
- How to display an element on hover with CSS?
- How to Move an Element in a Circular Path with CSS?
- How to apply linear transformation to the input data in PyTorch?
- How to apply CSS to iframe?
- How to apply inline CSS?
- How to zoom/scale an element on hover with CSS?

Advertisements