html - 如何在框中以正确的大小放置文本,垂直输入?

标签 html css text css-position

我正在尝试将一些文本垂直书写在框的右侧。我已经把垂直部分放下了,但我不能把它放在右边。如何设置文本在框中的位置?

.aboutbox {
  background-color: white;
  width: 150px;
  height: 100px;
  border: 6px solid black;
  text-align: bottom;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
<div class="aboutbox">ABOUT</div>

最佳答案

考虑填充而不是设置宽度:

.aboutbox {
  padding-right: 120px;
  height: 100px;
  border: 6px solid black;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
<div class="aboutbox">ABOUT</div>

关于html - 如何在框中以正确的大小放置文本,垂直输入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55943217/

相关文章:

html - h1 标题顶部的间隙

javascript - 在 Fixed Header Uncaught TypeError top undefined 中

html - 如何在 HTML 中将文本和图像并排放置?

jquery - 悬停时在水平轴上倒置文本 - jquery 或 css

javascript - 滚动时我无法使导航栏保持在顶部

html - 表格与 Div 对齐

jquery - fullcalendar 不是函数

html - 以 Angular 将滚动条添加到非标题行

javascript - DIV 在其内容之前创建换行符

css - 最大文本行数 + 省略号