bootstrap typography

本文深入解析Bootstrap中关于全局默认字体大小、行高、段落样式、突出显示、强调文字颜色、缩写、引用、表单样式等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://twitter.github.com/bootstrap/base-css.html#typography

国内:

http://ninghao.net/bootstrap/components.html

 

1.

Bootstrap's global default font-size is 14px, with a line-height of 20px. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their line-height (10px by default).

 

缺省font-size:14px line-height 20px  bootom-margin:10px

 

 

2.Make a paragraph stand out by adding .lead.

<p class="lead">...</p>

 

3.Emphasis 强调

三个tag:<small> <strong>(以粗体显示)<em>(以斜体显示)

 

4.Emphasis classes 文字的颜色区分

如:muted(柔和)、text-warning、text-error、text-info、text-success

<p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>

 

5.Abbreviations缩写

<abbr title="attribute">attr</abbr> 鼠标移到attr处会显示attribute的解释

<abbr title="HyperText Markup Language" class="initialism">HTML</abbr> 小字体显示,initialism是词首字母缩略词的意思

 

6.blockquote引用

 

7.form

7.1 from-search圆角显示输入框

Add .form-search to the form and .search-query to the <input> for an extra-rounded text input.

<form class="form-search"> <input type="text" class="input-medium search-query"> <button type="submit" class="btn">Search</button> </form>

 

 

  

 

7.2Inline form 不换行显示多个控件

 

7.3Horizontal form(labe右对齐,控件左对齐)

 

Add .form-horizontal to the form Wrap labels and controls in .control-group Add .control-label to the label Wrap any associated controls in .controls for proper alignment

 

  

 例子:http://twitter.github.com/bootstrap/base-css.html#forms

 

 

 7.4前或后加文字lable+input或在一行

<div class="input-prepend"> <span class="add-on">@</span> <input class="span2" id="prependedInput" type="text" placeholder="Username"> </div> <div class="input-append"> <input class="span2" id="appendedInput" type="text"> <span class="add-on">.00</span> </div>

 
  

 

<div class="input-prepend input-append"> <span class="add-on">$</span> <input class="span2" id="appendedPrependedInput" type="text"> <span class="add-on">.00</span> </div>

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值