Correction status:Uncorrected
Teacher's comments:
1 编写一个标准的下拉菜单
2.使用按钮组编写一个分裂式下拉菜单
代码如下:
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <link rel="stylesheet" href="../lib/dist/css/bootstrap.css"> </head> <body> <div class="dropdown"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown"> PHP.CN讲师 <span class="caret"></span> </button> <ul class="dropdown-menu" > <li class="dropdown-header">掌声有请</li> <li><a href="#">欧阳克</a></li> <li><a href="#">灭绝师太</a></li> <li><a href="#">西门大官人</a></li> <li role="separator" class="divider"></li> <li><a href="#">PeterZhu</a></li> </ul> </div> <div class="btn-group"> <button type="button" class="btn btn-success">点赞</button> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" > <span class="caret"></span> </button> <ul class="dropdown-menu"> <li><a href="#">送花</a></li> <li><a href="#">投币</a></li> <li><a href="#">扫码支持</a></li> <li role="separator" class="divider"></li> <li><a href="#">分享到朋友圈</a></li> </ul> </div> <script src="../lib/jquery.js"></script> <script src="../lib/dist/js/bootstrap.js"></script> </body> </html>
点击 "运行实例" 按钮查看在线实例