Boostrap全局CSS样式

本文介绍了Bootstrap框架中提供的全局CSS样式,包括CSS Reset、按钮样式、图片样式、排版和代码样式以及表格样式的设置方法。通过这些样式,开发者可以快速地为网页元素设置一致的外观。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、Bootstrap提供的CSS Reset

  * { box-sizing: border-box; }

  body { font ...; color: #333; background: ...; margin: 0;}

  h1 { font-size: ;  margin-top: 20px;  margin-bottom: 10px;}

  h2 { font-size: ;  margin-top: 20px;  margin-bottom: 10px;}

  h3 { font-size: ;  margin-top: 20px;  margin-bottom: 10px;}

  h4  { font-size: ;  margin-top: 10px;  margin-bottom: 10px;} 

  h5  { font-size: ;  margin-top: 10px;  margin-bottom: 10px;} 

  h6  { font-size: ;  margin-top: 10px;  margin-bottom: 10px;} 

  a { color:;  text-decoration: ;}

  img { border: 0;  vertical-align: middle; }

  p { margin-bottom:10px; }

  ......

2、Bootstrap全局CSS样式——按钮——简单&有趣

  .btn { padding:;  border: ;}

  .btn-default { color:;  background:;  border-color:;}

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

  .btn-danger

  .btn-success

  .btn-warning

  .btn-info

  .btn-primary

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

  .btn-lg

  .btn-sm

  .btn-xs

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

  .btn-block

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

  .pull-left { float: left; }

  .pull-right { float: right; }

3、Bootstrap全局CSS样式——图片——简单&有趣

  .img-rounded

  .img-circle

  .img-thumbnail 缩略图片/拇指图片

  .img-responsive  响应式图片

4、Bootstrap全局CSS样式——排版和代码

 .text-danger

 .text-success

 .text.warning

 .text-info

 .text-primary

 .bg-danger

 .bg-success

 .bg-warning

 .bg-info

 .bg-primary

 .text-left

 .text-right

 .text-center

 .text-justify  文本两端调整对齐

 .text-uppercase  

 .text-lowercase

 .text-capitalize  

 .list-unstyled

 .list-inline    

5、Bootstrap全局CSS样式——表格——简单&有趣

  .table

  .table-bordered 带边框的表格

  .table-responsive 响应式表格  注意:使用在table的父元素上,而不是table上

  .table-striped 隔行变色的表格

  .table-hover 带悬停效果的表格

转载于:https://www.cnblogs.com/-walker/p/5022549.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值