Blogger Information
Blog 33
fans 0
comment 0
visits 24365
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
bootstrap下拉菜单和分裂式按钮 20180926 23:00
EmonXu的博客
Original
879 people have browsed it

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>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post