css rotate 90 deg
transform: rotate(90deg);
css rotate 180 degrees
.rotateimg180 {
-webkit-transform:rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
css rotate 90 degrees
.my-div{
transform: rotate(90deg); /* rotate x-axis and y-axis */
transform: rotateX(180deg); /* rotate x-axis */
transform: rotateY(180deg); /* rotate y-axis */
}
css rotate
<style>
div {
width: 80px;
height: 80px;
background-color: skyblue;
}
.rotated {
transform: rotate(45deg);
background-color: pink;
}
</style>
/* In body of html doc */
<div>Normal</div>
<div class="rotated">Rotated</div>
css rotate text
/* Answer to: "css rotate text" */
/*
If what you are looking for is a way to set type vertically,
you’re best bet is probably CSS writing-mode, here's a link:
https://css-tricks.com/almanac/properties/w/writing-mode/
If you’re just trying to turn some text, you can rotate entire
elements like this, which rotates it 90 degrees counterclockwise:
*/
.rotate {
transform: rotate(-90deg);
/* Legacy vendor prefixes that you probably don't need... */
/* Safari */
-webkit-transform: rotate(-90deg);
/* Firefox */
-moz-transform: rotate(-90deg);
/* IE */
-ms-transform: rotate(-90deg);
/* Opera */
-o-transform: rotate(-90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
/*
For more information go to:
https://css-tricks.com/snippets/css/text-rotation/
*/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us