5

我想用 Bootstrap 垂直写文本,但不像将文本转换 90°。垂直,但转动且难以阅读。

在此处输入图像描述

但实际上是这样写的:竖着不转

在此处输入图像描述

我认为有办法用 Bootstrap 做到这一点?你知道吗?

4

4 回答 4

13

你可以这样做:

CSS
      .verticaltext{
           width:1px;
           word-wrap: break-word;
           white-space:pre-wrap; 
        }
于 2015-12-19T13:04:25.947 回答
5

你可能想看看这个教程!
https://davidwalsh.name/css-vertical-text

简单来说,您可以使用 CSS 来执行此操作。

.vertical-text {
transform: rotate(90deg);
transform-origin: left top 0;
}
于 2015-12-19T15:31:00.103 回答
4
writing-mode: vertical-rl;
text-orientation: mixed;

// or

writing-mode: vertical-rl;
text-orientation: upright;

也试试这些值

/* Keyword values */
text-orientation: mixed;
text-orientation: upright;
text-orientation: sideways-right;
text-orientation: sideways;
text-orientation: use-glyph-orientation;

/* Global values */
text-orientation: inherit;
text-orientation: initial;
text-orientation: unset;
于 2018-10-23T07:56:27.823 回答
-4

在 Bootstrap 和 CSS 中绝对没有特定的方式来以他的特定方式编写......

我想做这种事情的唯一方法是在每个字母之后返回一行。以 HTML<br>标记为例。考虑到单词会被拆分,这种技术的主要问题是语义。

于 2015-12-19T12:55:39.483 回答