Bootstrap3学习笔记(二)之排版


Posted in Javascript onMay 20, 2016

在上篇文章给大家介绍了BootStrap3学习笔记(一)之网格系统

对于标题,Bootstrap已经修改了h1--h6的样式,如果需要副标题,还可以在其中使用small标记

<h1>h1. Bootstrap heading <small>Secondary text</small></h1>
<h2>h2. Bootstrap heading <small>Secondary text</small></h2>
<h3>h3. Bootstrap heading <small>Secondary text</small></h3>
<h4>h4. Bootstrap heading <small>Secondary text</small></h4>
<h5>h5. Bootstrap heading <small>Secondary text</small></h5>
<h6>h6. Bootstrap heading <small>Secondary text</small></h6>

如果页面中有一个需要与众不同的h1,则可以将其包含在样式为“page-header的div中。

<div class="page-header">
<h1>Twitter Bootstrap <small>An intuitive front-end framework</small></h1>
</div>

Bootstrap默认字体大小为14px,行高1.428,段落间距10px,如果某个段落需要醒目一点,可是有'lead'类
使用text-*类,可以很方便的设定文本的水平对齐方式

<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>

HTML中的文字格式标记在Bootstrap中都可以使用

<p><b>This is bold text</b></p>
<p><big>This is big text</big></p>
<p><code>This is computer code</code></p>
<p><em>This is emphasized text</em></p>
<p><i>This is italic text</i></p>
<p><mark>This is highlighted text</mark></p>
<p><small>This is small text</small></p>
<p><strong>This is strongly emphasized text</strong></p>
<p>This is <sub>subscript</sub> and <sup>superscript</sup></p>
<p><ins>This text is inserted to the document</ins></p>
<p><del>This text is deleted from the document</del></p>

字母格式转换类可以很好的完成需要的转换:

<p class="text-lowercase">The quick brown fox jumps over the lazy dog.</p>
<p class="text-uppercase">The quick brown fox jumps over the lazy dog.</p>
<p class="text-capitalize">The quick brown fox jumps over the lazy dog.</p>

颜色是传递内容重要性的有力方式,Bootstrap提供了便利的设定文字强调级别的类:

<p class="text-muted">Muted: This text is grayed out.</p>
<p class="text-primary">Important: Please read the instructions carefully before proceed.</p>
<p class="text-success">Success: Your message has been sent successfully.</p>
<p class="text-info">Note: You must agree with the terms and conditions to complete the sign up process.</p>
<p class="text-warning">Warning: There was a problem with your network connection.</p>
<p class="text-danger">Error: An error has been occurred while submitting your data.</p>

对引用内容也做了修饰:

<blockquote class="pull-right">
<p>The world is a dangerous place to live; not because of the people who are evil, but because of the people who don't do anything about it.</p>
<small>by <cite>Albert Einstein</cite></small>
</blockquote>

其中的类是为了右对齐引用。

以上所述是小编给大家介绍的Bootstrap3学习笔记(二)之排版的相关知识,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对三水点靠木网站的支持!

Javascript 相关文章推荐
javascript模拟select,jselect的方法实现
Nov 08 Javascript
js获取当月最后一天实例代码
Nov 19 Javascript
常见浏览器多长时间会提示“脚本运行时间过长”总结
Apr 29 Javascript
JavaScript数据类型学习笔记
Jan 25 Javascript
总结Node.js中的一些错误类型
Aug 15 Javascript
js select实现省市区联动选择
Apr 17 Javascript
JS实现HTML标签转义及反转义
Apr 14 Javascript
浅谈javascript的url参数parse和build函数
Mar 04 Javascript
js实现年月日表单三级联动
Apr 17 Javascript
JavaScript实现单例模式实例分享
Dec 22 Javascript
详解Vue CLI 3.0脚手架如何mock数据
Nov 23 Javascript
小程序实现搜索框功能
Mar 26 Javascript
js获取iframe中的window对象的实现方法
May 20 #Javascript
BootStrap3学习笔记(一)之网格系统
May 20 #Javascript
有关JavaScript中call()和apply() 的一些理解
May 20 #Javascript
Bootstrap表格和栅格分页实例详解
May 20 #Javascript
JavaScript 数组some()和filter()的用法及区别
May 20 #Javascript
JS数组操作(数组增加、删除、翻转、转字符串、取索引、截取(切片)slice、剪接splice、数组合并)
May 20 #Javascript
AngularJS中的指令全面解析(必看)
May 20 #Javascript
You might like
PHP开发过程中常用函数收藏
2009/12/14 PHP
windows环境下php配置memcache的具体操作步骤
2013/06/09 PHP
PHP时间和日期函数详解
2015/05/08 PHP
关于php 高并发解决的一点思路
2017/04/16 PHP
php获取excel文件数据
2017/04/21 PHP
php使用flock阻塞写入文件和非阻塞写入文件的实例讲解
2017/07/10 PHP
使用php自动备份数据库表的实现方法
2017/07/28 PHP
解决PHPstudy Apache无法启动的问题【亲测有效】
2020/10/30 PHP
jQuery live( type, fn ) 委派事件实现
2009/10/11 Javascript
JQuery实现倒计时按钮具体方法
2013/11/14 Javascript
javascript随机之洗牌算法深入分析
2014/06/07 Javascript
JavaScript函数的一些注意要点小结及js匿名函数
2015/11/10 Javascript
Bootstrap弹出带合法性检查的登录框实例代码【推荐】
2016/06/23 Javascript
JavaScript实现的微信二维码图片生成器的示例
2016/10/26 Javascript
Vue-resource实现ajax请求和跨域请求示例
2017/02/23 Javascript
一个可复用的vue分页组件
2017/05/15 Javascript
JS实现的随机排序功能算法示例
2017/06/09 Javascript
JavaScript脚本语言是什么_动力节点Java学院整理
2017/06/26 Javascript
详解vue中引入stylus及报错解决方法
2017/09/22 Javascript
js中this的指向问题归纳总结
2018/11/28 Javascript
微信小程序可滑动月日历组件使用详解
2019/10/21 Javascript
vue-cli4.x创建企业级项目的方法步骤
2020/06/18 Javascript
python使用xlrd实现检索excel中某列含有指定字符串记录的方法
2015/05/09 Python
python unittest实现api自动化测试
2018/04/04 Python
python GUI库图形界面开发之PyQt5 UI主线程与耗时线程分离详细方法实例
2020/02/26 Python
python字典key不能是可以是啥类型
2020/08/04 Python
使用phonegap获取位置信息的实现方法
2017/03/31 HTML / CSS
三星美国官网:Samsung美国
2017/02/06 全球购物
赫里福德的一家乡村零售商店:Philip Morris & Son
2017/06/25 全球购物
美国农场商店:Blain’s Farm & Fleet
2020/01/17 全球购物
心理健康课教学反思
2014/02/13 职场文书
路政管理求职信
2014/06/18 职场文书
仓管员岗位职责
2015/02/03 职场文书
python之基数排序的实现
2021/07/26 Python
Java 数据结构七大排序使用分析
2022/04/02 Java/Android
JS实现刷新网页后之前浏览位置保持不变示例详解
2022/08/14 Javascript