简单教程
提交运行
代码编辑器:
<!DOCTYPE htm> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.bootcss.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"> <style>body {margin:10px}</style> <div class="container"> <div class="row"> <div class="span5"> <!-- 标准按钮 --> <p> <button type="button" class="btn btn-primary btn-small btn-block">默认小的块级按钮</button> <button type="button" class="btn btn-default btn-large btn-block">默认大的块级按钮</button> <button type="button" class="btn btn-primary btn-mini btn-block">默认特别小的块级按钮</button> </p> <p> <!-- 提供额外的视觉效果,标识一组按钮中的原始动作 --> <button type="button" class="btn btn-primary btn-small btn-block">小的原始块级按钮</button> <button type="button" class="btn btn-primary btn-large btn-block">大的原始块级按钮</button> <button type="button" class="btn btn-primary btn-mini btn-block">特别小的原始块级按钮</button> </p> <p> <!-- 表示一个成功的或积极的动作 --> <button type="button" class="btn btn-success btn-small btn-block">小的成功块级按钮</button> <button type="button" class="btn btn-success btn-large btn-block">大的成功块级按钮</button> <button type="button" class="btn btn-success btn-mini btn-block">特别小的成功块级按钮</button> </p> <p> <!-- 信息警告消息的上下文按钮 --> <button type="button" class="btn btn-info btn-small btn-block">小的信息块级按钮</button> <button type="button" class="btn btn-info btn-large btn-block">大的信息块级按钮</button> <button type="button" class="btn btn-info btn-mini btn-block">特别小的信息块级按钮</button> </p> <p> <!-- 表示应谨慎采取的动作 --> <button type="button" class="btn btn-warning btn-small btn-block">小的警告块级按钮</button> <button type="button" class="btn btn-warning btn-large btn-block">大的警告块级按钮</button> <button type="button" class="btn btn-warning btn-mini btn-block">特别小的警告块级按钮</button> </p> <p> <!-- 表示一个危险的或潜在的负面动作 --> <button type="button" class="btn btn-danger btn-small btn-block">小的危险块级按钮</button> <button type="button" class="btn btn-danger btn-large btn-block">大的危险块级按钮</button> <button type="button" class="btn btn-danger btn-mini btn-block">特别小的危险块级按钮</button> </p> <p> <!-- 并不强调是一个按钮,看起来像一个链接,但同时保持按钮的行为 --> <button type="button" class="btn btn-link btn-small btn-block">小的链接块级按钮</button> <button type="button" class="btn btn-link btn-large btn-block">大的链接块级按钮</button> </p> </div> </div> </div>
运行结果: