首页 > 代码库 > bootstrap 表单样式

bootstrap 表单样式

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <link rel="stylesheet" href=http://www.mamicode.com/"http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.css"> 
    <style>
        .form-control-feedback{right:15px;}
        @media (min-width: 768px) {
            .flabel{text-align: right;line-height: 30px;}
            .finput{padding:0;}
            .form-control-feedback{right:0px;}
        }
    </style>
</head>
<body>
    <div class="container">
        <div>
            <form>
                <div class="form-group has-success has-feedback">
                    <div class="col-sm-2 flabel">
                        <label for="">标签:</label>
                    </div>
                    <div class="col-sm-6 finput">
                        <input type="text" class="form-control input-sm">
                        <span class="form-control-feedback glyphicon glyphicon-remove"></span>
                    </div>
                    <div class="col-sm-4 ftips">
                        <div class="help-block">提示</div>
                    </div>
                </div>
                <div class="form-group has-success has-feedback">
                    <div class="col-sm-2 flabel">
                        <label for="">标签:</label>
                    </div>
                    <div class="col-sm-6 finput">
                        <input type="text" class="form-control input-sm">
                        <span class="form-control-feedback glyphicon glyphicon-remove"></span>
                    </div>
                    <div class="col-sm-4 ftips">
                        <div class="help-block">提示</div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</body>
</html>

 

bootstrap 表单样式