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 相关文章推荐
jQuery :nth-child前有无空格的区别分析
Jul 11 Javascript
js实例属性和原型属性示例详解
Nov 23 Javascript
JavaScript中的console.assert()函数介绍
Dec 29 Javascript
jQuery中has()方法用法实例
Jan 06 Javascript
Jquery对select的增、删、改、查操作
Feb 06 Javascript
jQuery中大家不太了解的几个方法
Mar 04 Javascript
基于javascript的Form表单验证
Dec 29 Javascript
微信小程序实现bindtap等事件传参
Apr 08 Javascript
JavaScript深入V8引擎以及编写优化代码的5个技巧
Jun 24 Javascript
js验证密码强度解析
Mar 18 Javascript
viewer.js一个强大的基于jQuery的图像查看插件(支持旋转、缩放)
Apr 01 jQuery
JS实现扫雷项目总结
May 19 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
phpmyadmin出现Cannot start session without errors问题解决方法
2014/08/14 PHP
smarty中js的调用方法示例
2014/10/27 PHP
PHP中file_exists()判断中文文件名无效的解决方法
2014/11/12 PHP
PHP使用内置函数file_put_contents写入文件及追加内容的方法
2015/12/07 PHP
php结合web uploader插件实现分片上传文件
2016/05/10 PHP
PHP7.1新功能之Nullable Type用法分析
2016/09/26 PHP
php mysql PDO 查询操作的实例详解
2017/09/23 PHP
javascript 避免闭包引发的问题
2009/03/17 Javascript
JavaScript将取代AppleScript?
2014/09/18 Javascript
JS验证邮件地址格式方法小结
2015/12/01 Javascript
Three.js学习之正交投影照相机
2016/08/01 Javascript
清除js缓存的多种方法总结
2016/12/09 Javascript
ionic2 tabs 图标自定义实例
2017/03/08 Javascript
Bootstrap缩略图的创建方法
2017/03/22 Javascript
vue Element-ui input 远程搜索与修改建议显示模版的示例代码
2017/10/19 Javascript
详解vue路由篇(动态路由、路由嵌套)
2019/01/27 Javascript
NodeJs操作MongoDB教程之分页功能以及常见问题
2019/04/09 NodeJs
JavaScript遍历查找数组中最大值与最小值的方法示例
2019/05/24 Javascript
Vue 修改网站图标的方法
2020/12/31 Vue.js
Python通过matplotlib画双层饼图及环形图简单示例
2017/12/15 Python
Python实现带参数与不带参数的多重继承示例
2018/01/30 Python
Tensorflow 利用tf.contrib.learn建立输入函数的方法
2018/02/08 Python
python使用opencv按一定间隔截取视频帧
2018/03/06 Python
TensorFlow实现Batch Normalization
2018/03/08 Python
python定时检测无响应进程并重启的实例代码
2019/04/22 Python
django 信号调度机制详解
2019/07/19 Python
django 基于中间件实现限制ip频繁访问过程详解
2019/07/30 Python
Python3批量移动指定文件到指定文件夹方法示例
2019/09/02 Python
英国在线药房和在线药剂师:Chemist 4 U
2020/01/05 全球购物
婚前协议书
2014/04/15 职场文书
大学军训的体会
2014/11/08 职场文书
2014年基层党建工作总结
2014/11/11 职场文书
2015欢度元旦标语口号
2014/12/09 职场文书
办公室主任个人总结
2015/02/28 职场文书
2015年民兵整组工作总结
2015/07/24 职场文书
AJAX实现指定部分页面刷新效果
2021/10/16 Javascript