CSS Text orientation : vertically oriented to the right

前端 未结 2 1675
感动是毒
感动是毒 2020-11-27 22:59

Is it possible to get my text oriented vertically to the right with CSS, like on the image below ?

I tried the way below, but without being able to reverse

相关标签:
2条回答
  • 2020-11-27 23:47

    sideways isn't supported by all the browser. Instead you can replace it with a scale transformation

    div {
      writing-mode: vertical-rl;
      /*text-orientation: sideways;*/
      transform:scale(-1);
    }
    <div>dimanche</div>

    0 讨论(0)
  • 2020-11-27 23:49

    rotate it by -90deg using transform. If you want it in the opposite direction, rotate it by 90deg

    div {
      background-color: #ccc;
      display: inline-block;
      padding: 5px;
      transform: rotate(-90deg);
      transform-origin: center bottom;
    }
    <div>dimanche</div>

    0 讨论(0)
提交回复
热议问题