BootWiki教程网
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap 3 活动按钮</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <!-- Bootstrap --> <link href="../bootstrap/v3/dist/css/bootstrap.min.css" media="screen" rel="stylesheet"> <style> body { padding: 50px } </style> <!-- HTML5 Shim and Respond。js IE8支持 HTML5 原始和媒体查询。 --> <!-- WARNING: Respond。如果通过file://查看页面js将不工作。 --> <!--[if lt IE 9]> <script src="//cdn.staticfile.net/html5shiv/3.7.0/html5shiv.js"></script> <script src="//cdn.staticfile.net/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> <body> <!-- 标准按钮 --> <button class="btn btn-default active" type="button">默认</button> <!-- 提供额外的视觉效果,标识一组按钮中的原始动作 --> <button class="btn btn-primary active" type="button">原始</button> <!-- 表示一个成功的或积极的动作 --> <button class="btn btn-success active" type="button">成功</button> <!-- 信息警告消息的上下文按钮 --> <button class="btn btn-info active" type="button">信息</button> <!-- 表示应谨慎采取的动作 --> <button class="btn btn-warning active" type="button">警告</button> <!-- 表示一个危险的或潜在的负面动作 --> <button class="btn btn-danger active" type="button">危险</button> <!-- 并不强调是一个按钮,看起来像一个链接,但同时保持按钮的行为 --> <button class="btn btn-link active" type="button">链接</button> <!-- jQuery (对Bootstrap的 JavaScript插件来说是必要的---> <script src="https://code.jquery.com/jquery.js"></script> <!-- 包括所有已编译的插件(如下),或者根据需要包括单个文件 --> <script src="../bootstrap/v3/dist/js/bootstrap.min.js"></script> </body> </html>
运行结果