【发布时间】:2015-02-04 05:40:26
【问题描述】:
我正在尝试使用 bootstrap 3 制作一个简单的页眉。代码如下:
<div class="page-header">
<h1>Text on the left</h1>
<h3 class="text-right">This to the right but on the same line</h3>
</div>
这里有一个 jsfiddle 可以尝试:http://jsfiddle.net/DTcHh/2450/
基本上我只想在page-header 内的左右两侧放置文字,但在同一行。
使用float:left 和float:right 与普通html 一样“打破”page-header 的常用技巧,这意味着文本正确对齐但显示在页眉之外(下方),页眉仍然为空。
有什么线索吗?
【问题讨论】:
标签: html twitter-bootstrap twitter-bootstrap-3