CSS Code to Rotate an Element

it is an css code where an element can be rotated to rotate an element it is a basic rotation of 45degrees

 

.rotate {
    width: 100px;
    height: 100px;
    background-color: blue;
    transform: rotate(45deg);
}

usage in html in division tag

 

<div class="rotate"></div>

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top