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中继承的一些示例方法与属性参考
Aug 07 Javascript
基于JavaScript制作霓虹灯文字 代码 特效
Sep 01 Javascript
分享两段简单的JS代码防止SQL注入
Apr 12 Javascript
jQuery日程管理插件fullcalendar使用详解
Jan 07 Javascript
jQuery插件FusionCharts绘制2D环饼图效果示例【附demo源码】
Apr 10 jQuery
JavaScript实现form表单的多文件上传
Mar 27 Javascript
JS+HTML5 Canvas实现简单的写字板功能示例
Aug 30 Javascript
vue实现一个炫酷的日历组件
Oct 08 Javascript
JS实现的点击按钮图片上下滚动效果示例
Jan 28 Javascript
利用vue重构有赞商城的思路以及总结整理
Feb 21 Javascript
使用异步组件优化Vue应用程序的性能
Apr 28 Javascript
eslint 的三大通用规则详解
May 16 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使用trim函数去除字符串左右空格及特殊字符实例
2016/01/07 PHP
PHP使用正则表达式实现过滤非法字符串功能示例
2018/06/04 PHP
Laravel5.4框架中视图共享数据的方法详解
2019/09/05 PHP
JavaScript 继承详解 第一篇
2009/08/30 Javascript
JavaScript 10件让人费解的事情
2010/02/15 Javascript
jquery通过a标签删除table中的一行的代码
2013/12/02 Javascript
基于javascript实现彩票随机数生成(升级版)
2020/04/17 Javascript
浅析jQuery Ajax请求参数和返回数据的处理
2016/02/24 Javascript
最细致的vue.js基础语法 值得收藏!
2016/11/03 Javascript
jquery结合html实现中英文页面切换
2016/11/29 Javascript
微信小程序开发之选项卡(窗口底部TabBar)页面切换
2017/04/12 Javascript
解决koa2 ctx.render is not a function报错问题
2018/08/07 Javascript
jQuery实现基本隐藏与显示效果的方法详解
2018/09/05 jQuery
webstorm+vue初始化项目的方法
2018/10/18 Javascript
使用vue中的混入mixin优化表单验证插件问题
2019/07/02 Javascript
Vue.js暴露方法给WebView的使用操作
2020/09/07 Javascript
jquery实现图片放大镜效果
2020/12/23 jQuery
跟老齐学Python之字典,你还记得吗?
2014/09/20 Python
Python使用Matplotlib实现雨点图动画效果的方法
2017/12/23 Python
Python unittest单元测试框架总结
2018/09/08 Python
Python可变和不可变、类的私有属性实例分析
2019/05/31 Python
python 实现turtle画图并导出图片格式的文件
2019/12/07 Python
Django ORM 查询表中某列字段值的方法
2020/04/30 Python
简单介绍HTML5中的文件导入
2015/05/08 HTML / CSS
联想哥伦比亚网上商城:Lenovo Colombia
2017/01/10 全球购物
联想韩国官网:Lenovo Korea
2018/05/10 全球购物
德国药房apodiscounter中文官网:德国排名前三的网上药店
2019/06/03 全球购物
美国名牌手表折扣网站:Jomashop
2020/05/22 全球购物
人民教师的自我评价分享
2014/02/21 职场文书
体育馆的标语
2014/06/24 职场文书
优秀毕业生的求职信
2014/07/21 职场文书
软弱涣散基层党组织整改方案
2014/10/25 职场文书
办公室岗位职责
2015/02/04 职场文书
技术负责人岗位职责
2015/02/10 职场文书
指导老师鉴定意见
2015/06/05 职场文书
详解Redis的三种常用的缓存读写策略步骤
2022/05/06 Redis