
- 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
Rotate the element based on an angle using CSS
Let us learn how to rotate the element based on an angle
Example
<html> <head> <style> div { width: 300px; height: 100px; background-color: pink; border: 1px solid black; } div#myDiv { /* IE 9 */ -ms-transform: rotate(20deg); /* Safari */ -webkit-transform: rotate(20deg); /* Standard syntax */ transform: rotate(20deg); } </style> </head> <body> <div> Tutorials point.com. </div> <div id = "myDiv"> Tutorials point.com </div> </body> </html>
Output
- Related Articles
- How to rotate an element using CSS?
- How to rotate an image in imageview by an angle on Android using Kotlin?
- How to rotate an image in imageview by an angle on iOS App using Swift?
- Rotate div to -20 degrees angle with CSS
- How to rotate an Image in ImageView by an angle on Android?
- How to rotate an image with the canvas HTML5 element from the bottom center angle?
- How to create multiple transitions on an element using CSS?
- Changing Layouts Based on Screen Size using CSS
- How to find an element based on a data-attribute value using jQuery
- Changing Column Width Based on Screen Size using CSS
- PyTorch – How to rotate an image by an angle?
- How to add border to an element on mouse hover using CSS?
- Rotate div with Matrix transforms using CSS
- The CSS rotate() Function
- Rotate div with skew x-axis using CSS

Advertisements