Home > Web Front-end > CSS Tutorial > Can CSS Display Text Vertically to the Right?

Can CSS Display Text Vertically to the Right?

Patricia Arquette
Release: 2024-11-10 14:14:02
Original
751 people have browsed it

Can CSS Display Text Vertically to the Right?

Is CSS Capable of Displaying Text Vertically to the Right?

Achieving vertically oriented text to the right using CSS is indeed possible. To accomplish this, you can manipulate the text's orientation and writing mode. However, it's important to note that not all browsers support the sideways text orientation property.

The following CSS code will orient the text vertically to the right, though it relies on a vendor-prefixed property:

div {
  writing-mode: vertical-rl;
  text-orientation: sideways;
}
Copy after login

However, since sideways text orientation isn't supported universally, you can use a scale transformation as an alternative:

div {
  writing-mode: vertical-rl;
  transform: scale(-1);
}
Copy after login

This alternative method achieves the same result, enabling you to have vertically oriented text to the right in a browser-compatible way.

The above is the detailed content of Can CSS Display Text Vertically to the Right?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template