我想用 Bootstrap 垂直写文本,但不像将文本转换 90°。垂直,但转动且难以阅读。
但实际上是这样写的:竖着不转
我认为有办法用 Bootstrap 做到这一点?你知道吗?
你可以这样做:
CSS
.verticaltext{
width:1px;
word-wrap: break-word;
white-space:pre-wrap;
}
你可能想看看这个教程!
https://davidwalsh.name/css-vertical-text
简单来说,您可以使用 CSS 来执行此操作。
.vertical-text {
transform: rotate(90deg);
transform-origin: left top 0;
}
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;
在 Bootstrap 和 CSS 中绝对没有特定的方式来以他的特定方式编写......
我想做这种事情的唯一方法是在每个字母之后返回一行。以 HTML<br>
标记为例。考虑到单词会被拆分,这种技术的主要问题是语义。