在输入插件引导程序中放置一个复选框

时间:2014-01-03 16:24:02

标签: html5 css3 twitter-bootstrap input checkbox

我正在尝试在输入组插件中放置checkbox,同时使用bootstrap 3表单。 选中此复选框是以show password形式登录。

checkbox http://f.cl.ly/items/0m2P0U1K2t3s1g1u003u/checkbox.PNG

<form class="form-signin">
    <h1 class="form-signin-heading" align="center"><strong>Owner Gateway</strong></h1>

    <input type="text" class="form-control" placeholder="Username" required autofocus></input>

    <div class="wrapper">
        <div class="input-group" style="width: 100%">
            <input type="text" class="form-control" placeholder="Password"/>
            <span class="input-group-addon">Show</span>
        </div>
    </div>

        <button class="btn btn-lg btn-primary btn-block" type="submit">Log in</button>
        <button class="btn btn-lg btn-primary btn-block" id="new-btn" type="submit">Stay Logged in</button>
    </div>
</form>

如果有人可以提供帮助,我将非常感激。

1 个答案:

答案 0 :(得分:13)

<div class="input-group" style="width: 100%">
    <input type="text" class="form-control" placeholder="Password"/>
    <span class="input-group-addon"><input type="checkbox"> Show</span>
</div>

试试这个。