HTML中class属性里多个单词并用空格隔开的意义。Bootstrap的引用

<!DOCTYPE html>
<script src="js/jquery/2.0.0/jquery.min.js"></script>
<link href="css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="js/bootstrap/3.3.6/bootstrap.min.js"></script>

<button type="button" class="btn">原始样式按钮</button>
<br>
<br>
<button type="button" class="btn btn-default">默认按钮</button>
<br>
<br>
<button type="button" class="btn btn-primary">提交按钮</button>

这是因为引用了bootstrap。如上面的class=“btn”的意思是这是一个默认的按钮,框架给了它大小,但btn-default的大小才是默认的,好看的。到了第三个,btn-primary给了这个按钮不一样的色彩,很好看。对其他h1,table等标签同理,但class里面的单词不一样了,这些单词也是指定的,特有的。

 <h1 class="label label-info" >订单管理</h1>

    <table class="table table-striped table-bordered table-hover 
     table-condensed">xxx</table>

这跟另一个class的含义不一样:


 div{
 text-align:center;
 }
h1.c111{
  color:green;
}
 
 .c222 {
  color:red;
}
</style>
<div class="d111">
<h1 class="c111">bilibili</h1>
<h1 class="c222">B站</h1>
<div>

这里的class与ID类似,并且有两种方式在css里面引用外部的两个h1。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值