• Bootstrap组件之输入框组


    .input-group——设置div为输入框组;

    .input-group-lg、.input-group-sm、.input-group-xs——改变输入框组的尺寸;

    .input-group-addon——在输入框前或后加入额外内容;

    .input-group-btn——在输入框前或后加入button或button式下拉菜单组件。

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1">
        <title>组件_输入框组</title>
        <link rel="stylesheet" href="bootstrap.min.css" type="text/css">
        <!--<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">-->
        <script src="jquery-1.11.1.min.js"></script>
        <script src="bootstrap.min.js"></script>
    </head>
    <body>
    <div class="container">
        <p>
            <div class="input-group">
                <span class="input-group-addon">$</span>
                <input type="number" class="form-control"/>
                <span class="input-group-addon">.00</span>
            </div>
        </p>
        <p>
        <div class="input-group input-group-lg">
            <span class="input-group-addon">$</span>
            <input type="number" class="form-control"/>
            <span class="input-group-addon">.00</span>
        </div>
        </p>
        <p>
            <div class="row">
                <div class="col-md-4">
                    <div class="input-group">
                        <span class="input-group-addon">
                            <input class="checkbox" type="checkbox"/>
                        </span>
                        <input type="text" class="form-control"/>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="马上查询"/>
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="button" >Go!</button>
                        </span>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="input-group">
                        <div class="input-group-btn">
                            <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                                产品分类
                                <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="#" role="menuitem">男装</a></li>
                                <li><a href="#" role="menuitem">女装</a></li>
                                <li><a href="#" role="menuitem">童装</a></li>
                            </ul>
                        </div>
                        <input type="text" class="form-control" placeholder="清凉一夏">
                    </div>
                </div>
            </div>
        </p>
    </div>
    
    </body>
    </html>


  • 相关阅读:
    标题:CSS-button添加display:block;属性后自动换行!
    JS-遍历对象
    JS-获取对象的长度大小
    HTML-span和div区别
    SQL-Foreach标签
    JS_Select_option切换自动触发事件
    JS_Select赋值的几种方式
    加密系统文件夹
    JS-返回上一页
    metronic 4.5.7开发环境下, 在Windows 10上安装了10.16.0版本的node js之后,导致node sass无法加载
  • 原文地址:https://www.cnblogs.com/mthoutai/p/6970145.html
Copyright © 2020-2023  润新知