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对象之间的转换 jQuery对象和原声DOM
Mar 07 Javascript
jQuery控制iFrame(实例代码)
Nov 19 Javascript
js动态切换图片的方法
Jan 20 Javascript
推荐阅读的js快速判断IE浏览器(兼容IE10与IE11)
Dec 13 Javascript
轻松实现js图片预览功能
Jan 18 Javascript
相册展示PhotoSwipe.js插件实现
Aug 25 Javascript
浅谈js基础数据类型和引用类型,深浅拷贝问题,以及内存分配问题
Sep 02 Javascript
完美解决手机网页中输入框被输入法遮挡的问题
Dec 19 Javascript
Vue 监听列表item渲染事件方法
Sep 06 Javascript
JS中通过url动态获取图片大小的方法小结(两种方法)
Oct 31 Javascript
JS代码检查工具ESLint介绍与使用方法
Feb 04 Javascript
类和原型的设计模式之复制与委托差异
Jul 07 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 面向对象之成员方法详解
2013/05/04 PHP
从零开始学YII2框架(六)高级应用程序模板
2014/08/20 PHP
PHP filter_var() 函数, 验证判断EMAIL,URL等
2021/03/09 PHP
奇妙的js
2007/09/24 Javascript
js判断生效时间不得大于失效时间的思路及代码
2013/04/23 Javascript
javascript中style.left和offsetLeft的用法说明
2014/03/07 Javascript
JavaScript运动减速效果实例分析
2015/08/04 Javascript
JavaScript实现LI列表数据绑定的方法
2015/08/04 Javascript
基于jQuery下拉选择框插件支持单选多选功能代码
2016/06/07 Javascript
JavaScript 字符串数字左补位,右补位,取固定长度,截位扩展函数代码
2017/03/25 Javascript
js使用html2canvas实现屏幕截取的示例代码
2017/08/28 Javascript
利用JS实现scroll自定义滚动效果详解
2017/10/17 Javascript
微信小程序出现wx.navigateTo页面不跳转问题的解决方法
2017/12/26 Javascript
swiper动态改变滑动内容的实现方法
2018/01/17 Javascript
函数式编程入门实践(一)
2019/04/20 Javascript
Vue实现商品飞入购物车效果(电商项目)
2019/11/26 Javascript
JS函数进阶之继承用法实例分析
2020/01/15 Javascript
跟老齐学Python之使用Python操作数据库(1)
2014/11/25 Python
举例讲解Python的Tornado框架实现数据可视化的教程
2015/05/02 Python
Python实现将DOC文档转换为PDF的方法
2015/07/25 Python
Python实现的递归神经网络简单示例
2017/08/11 Python
Python爬取qq空间说说的实例代码
2018/08/17 Python
python3 pygame实现接小球游戏
2019/05/14 Python
django2笔记之路由path语法的实现
2019/07/17 Python
解决flask接口返回的内容中文乱码的问题
2020/04/03 Python
data:image data url 文件转为Blob上传后端的方法
2019/07/16 HTML / CSS
波兰家具和室内装饰品购物网站:Vivre
2018/04/10 全球购物
质量工程师岗位职责
2013/11/16 职场文书
应届本科生推荐信范文
2013/12/25 职场文书
技术总监管理岗位职责
2014/03/09 职场文书
企业介绍信范文
2015/01/30 职场文书
董事长秘书岗位职责
2015/02/13 职场文书
2015年防汛工作总结
2015/05/15 职场文书
同学会感言
2015/07/30 职场文书
幼儿园开学家长寄语(2016春季)
2015/12/03 职场文书
创业计划书之家教托管
2019/09/25 职场文书