Bootstrap 样式之 文本颜色

Bootstrap 自定义的文本颜色 +  源码查看(测试版本3.x)

------------------------------------------------------------

先来看看bootstrap自定义的文本颜色是什么样的:

代码:

<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
    <link rel="stylesheet" href="bootstrap.css">
    <title>Bootstrap 101 Template</title>
    <style>
          p{font-size:50px;}
    </style>
    
  </head>
  <body>
              <p class="text-muted">我是muted</p>
              <p class="text-primary">我是primary</p>
              <p class="text-success">我是success</p>
              <p class="text-info">我是info</p>
              <p class="text-warning">我是warning</p>
              <p class="text-danger">我是danger</p>          
    <script src="jquery.js"></script>
    <script src="bootstrap.js"></script>
  </body>
</html>

显示效果:

                                         


------------------------------------------------------------------------------------------------------------

上面就是六个不同的文本颜色,我们再来看看具体的文本颜色是多少?


打开Bootstrap.css  , 搜索text-muted:

结果如下:


这样我们就可以看出默认情况下bootstrap给出的文本颜色样式为:

.text-muted{  color: #777 ;  }

.text-primary{  color: #337ab7 ;  }

.text-success{  color: #3c763d ;  }

.text-info{  color: #31708f ;  }

.text-warning{  color: #8a6d3b ;  }

.text-danger{  color: #a94442 ;  }


我们也可以基于这些样式进行修改和添加,得到符合自己需求的样式;


  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值