twitter-bootstrap Bootstrap 垂直书写

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34370907/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 23:27:25  来源:igfitidea点击:

Bootstrap vertical writing

htmlcsstwitter-bootstrapvertical-text

提问by Janis Jansen

I want to write text with Bootstrap, vertically but not like transform the text 90°. Vertical, but turned and hard to read.

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

enter image description here

在此处输入图片说明

But actually written like this: Vertical and not turned

但实际上是这样写的:垂直而不是翻转

enter image description here

在此处输入图片说明

I think there was a way to do this with Bootstrap? Do you know something?

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

回答by CastenettoA

You can do something like this:

你可以这样做:

CSS
      .vericaltext{
           width:1px;
           word-wrap: break-word;
           white-space:pre-wrap; 
        }

回答by vik1245

You may want to see this tutorial!
https://davidwalsh.name/css-vertical-text

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

In simplicity, you can use CSS to do this.

简单来说,您可以使用 CSS 来做到这一点。

.vertical-text {
transform: rotate(90deg);
transform-origin: left top 0;
}

回答by Yamen Ashraf

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

// or

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

Also try these values

也试试这些值

/* 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;

回答by Martin Campillo

There is absolutely no specific way in Bootstrap nor in CSS alone to write in his particular way ...

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

I guess the only way to do that kind of thing is to make a return to the line after every letter. Try the HTML <br>tag for example. The major issue with that kind of technique is semantics, considering the word will be split.

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