Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
142 views
in Technique[技术] by (71.8m points)

html - 表格内部的文本对齐类(Text-align class for inside a table)

Is there a set of classes in Twitter's Bootstrap framework that aligns text? (Twitter的Bootstrap框架中是否有一组对齐文本的类?)

For example, I have some tables with $ totals that I want aligned to the right... (例如,我有一些总计为$表,我想右对齐...)

<th class="align-right">Total</th>

and (和)

<td class="align-right">$1,000,000.00</td>
  ask by Mediabeastnz translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Bootstrap 3 (引导程序3)

v3 Text Alignment Docs (v3文字对齐文件)

<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>

Bootstrap 3文本对齐示例

Bootstrap 4 (引导程序4)

v4 Text Alignment Docs (v4文字对齐文件)

<p class="text-xs-left">Left aligned text on all viewport sizes.</p>
<p class="text-xs-center">Center aligned text on all viewport sizes.</p>
<p class="text-xs-right">Right aligned text on all viewport sizes.</p>

<p class="text-sm-left">Left aligned text on viewports sized SM (small) or wider.</p>
<p class="text-md-left">Left aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-left">Left aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-left">Left aligned text on viewports sized XL (extra-large) or wider.</p>

Bootstrap 4文本对齐示例


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...