twitter-bootstrap - 在 Bootstrap 中呈现旋转的文本

标签 twitter-bootstrap css twitter-bootstrap-3

使用 Bootstrap 3,我试图在 div 的一行和中心生成旋转文本。为什么 #map 中的文本显示为 3 行?

enter image description here

但我想要这样的东西:

enter image description here

@import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css");
#map{
  display: inline-block;
    transform: rotate(-90deg);

    color: #ed217c;
}
<div class="container">
<div class="row">
  <div class="col-xs-1"><span id="map">Here is Starter Plan</span></div>
  <div class="col-xs-11" style="background:red;min-height:400px;">Rest Of Content</div>
</div>
</div>  

最佳答案

只需使用 translate 使其正确定位并使用 white-space: nowrap; 使其没有换行符。

#map {
  display: inline-block;
  transform: rotate(-90deg) translate(-100px, -30px);
  color: #ed217c;
  white-space: nowrap;
}

关于twitter-bootstrap - 在 Bootstrap 中呈现旋转的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36030021/

相关文章:

twitter-bootstrap - d3.js:用 glyphicon 类附加一个 span

javascript - 如何让 xpages 模式触发关闭事件

javascript - Bootstrap 4 - 移动网站太宽。横向滚动发生。可能的语法错误?

css - 我怎样才能让 Twitter Bootstrap 井与它们的外部 div 高度相同?

html - SVG 不在 linkedin 中显示图像

html - 修复滚动 div 内的绝对 div

html - 我有一个 bootstrap 导航栏,它不会与按钮和搜索框保持一致 - 如何使其保持一致?

html - 定位链接到右边但不要溢出

jquery - 单击页面的任何其他控件时丢失 Bootstrap 缩略图的事件类

html - :not(:first-child) and :not(:first-of-type) not working