0

在 Bootrstrap 2 中,很容易在菜单中创建下拉登录:

<ul class="nav pull-right">
  <li class="dropdown" id="menuLogin">
    <a class="dropdown-toggle" href="#" data-toggle="dropdown" id="navLogin">Login</a>
    <div class="dropdown-menu" style="padding:17px;">
      <form class="form" id="formLogin"> 
        <input name="username" id="username" type="text" placeholder="Username"> 
        <input name="password" id="password" type="password" placeholder="Password"><br>
        <button type="button" id="btnLogin" class="btn">Login</button>
      </form>
    </div>
  </li>
</ul>

但是在 Bootstrap 3 中,我不知道该怎么做。

有人可以向我发布代码吗?

4

1 回答 1

0
<div id="nav-profile-dropdown" class="btn-group navbar-right">
    <button data-toggle="dropdown" class="btn btn-warning navbar-btn dropdown-toggle" type="button">
        <i class="glyphicon glyphicon-user"></i><span class="caret"></span>
    </button>
    <ul class="dropdown-menu">
        <li>
            <form method="post" action="/wp-login.php" id="navloginform" name="loginform">
                <label>Username
                    <br>
                    <input type="text" tabindex="10" size="20" value="" class="input" id="user_login" name="log">
                </label>
                <label>Password
                    <br>
                    <input type="password" tabindex="20" size="20" value="" class="input" id="user_pass" name="pwd">
                </label>
                <label>
                    <input type="checkbox" tabindex="90" value="forever" id="rememberme" name="rememberme">Remember Me</label>
                <input type="submit" tabindex="100" value="Log In" class="btn btn-primary" id="wp-submit" name="wp-submit">
                <input type="hidden" value="/wp-admin/" name="redirect_to">
            </form>
        </li>
    </ul>
</div>

基于来自JBST的代码

于 2013-11-11T18:58:25.400 回答