003 元素文字排版
一.介绍
在bootstrap之中,div和span元素都可以作为一个文字容器.
二.文字对齐方式
<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
我们可以使用text-位置词,实现文字的位置移动.
三.文字颜色
<p class="text-muted">我是颜色</p>
<p class="text-primary">我是颜色</p>
<p class="text-success">...我是颜色</p>
<p class="text-info">.我是颜色..</p>
<p class="text-warning">.我是颜色..</p>
<p class="text-danger">..我是颜色.</p>
使用class=”text-颜色词”实现文字的颜色. 其中颜色词是bootstrap定义的基本的颜色.
四.背景色
<p class="bg-primary">..www.</p>
<p class="bg-success">.dddd..</p>
<p class="bg-info">..ddd.</p>
<p class="bg-warning">..fff.</p>
<p class="bg-danger">...sss</p>
使用class=”bg-颜色词”实现背景色.
五.元素位置定位
<div style="width:100px;height:100px" class="bg-success center-block"></div>
<div style="width:100px;height:100px" class="bg-success pull-left"></div>
<div style="width:100px;height:100px" class="bg-success pull-right"></div>
使用class=”center-block”实现居中.
使用class=”pull-left”实现左.
使用class=”pull-right”实现右.