fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap 版本 2.0 在按钮和按钮组中使用图标</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Example of using icons in buttons and button groups - Bootstrap version 2.0 from fmpq.com"> <meta name="author" content=""> <!-- Le styles --> <link href="/jscss/bootstrap/v3/bootstrap.css" rel="stylesheet"> <style type="text/css"> form { margin-top: 50px; } </style> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="/images/bootstrap/favicon.ico"> <link rel="apple-touch-icon" href="/images/bootstrap/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="72x72" href="/images/bootstrap/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="114x114" href="/images/bootstrap/apple-touch-icon-114x114.png"> </head> <body> <div class="container"> <div class="row"> <div class="span4"> <div class="btn-toolbar" style="margin-bottom: 9px"> <div class="btn-group"> <a class="btn" href="#"><i class="icon-align-left"></i></a> <a class="btn" href="#"><i class="icon-align-center"></i></a> <a class="btn" href="#"><i class="icon-align-right"></i></a> <a class="btn" href="#"><i class="icon-align-justify"></i></a> </div> <div class="btn-group"> <a class="btn btn-primary" href="#"><i class="icon-user icon-white"></i> User</a> <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#"><i class="icon-pencil"></i> Edit</a></li> <li><a href="#"><i class="icon-trash"></i> Delete</a></li> <li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li> <li class="divider"></li> <li><a href="#"><i class="i"></i> Make admin</a></li> </ul> </div> </div> <p> <a class="btn" href="#"><i class="icon-refresh"></i> Refresh</a> <a class="btn btn-success" href="#"><i class="icon-shopping-cart icon-white"></i> Checkout</a> <a class="btn btn-danger" href="#"><i class="icon-trash icon-white"></i> Delete</a> </p> <p> <a class="btn btn-large" href="#"><i class="icon-comment"></i> Comment</a> <a class="btn btn-small" href="#"><i class="icon-cog"></i> Settings</a> <a class="btn btn-small btn-info" href="#"><i class="icon-info-sign icon-white"></i> More Info</a> </p> </div> </div> </div> <!-- Le javascript ================================================== --> <!-- 放置在文档的页面底部加快加载速度 --> <script src="/jscss/bootstrap/v3/jquery.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-transition.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-alert.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-modal.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-dropdown.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-scrollspy.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-tab.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-tooltip.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-popover.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-button.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-collapse.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-carousel.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-typeahead.js"></script> </body> </html>
运行结果