how to rotate with angle text in css code example

Example 1: rotate text css

.text {
  /* Browsers not below */
  transform: rotate(-90deg);
  /* Safari */
  -webkit-transform: rotate(-90deg);
  /* Firefox */
  -moz-transform: rotate(-90deg);
  /* Opera */
  -o-transform: rotate(-90deg);
  /* IE */
  -ms-transform: rotate(-90deg);
}

Example 2: 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>

Tags:

Css Example