Bootstrap .form-horizo​​ntal无法正常工作

Ste*_*zis 6 html twitter-bootstrap twitter-bootstrap-3

我是第一个尝试bootstrap的人.我想要实现的是让标签和输入相同的线条干净整洁.

任何人都可以解释为什么在下面的示例标签仍然高于输入?难道我做错了什么?

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta application-name="Test-System">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap Latest compiled and minified CSS -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

    <!-- Bootstrap Latest compiled and minified JavaScript -->
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

    <!-- jQuery UI from Google CDN -->
    <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
    <title></title>
</head>
<body>

    <form class="form-horizontal">
        <div class="control-group">
            <label for="input1" class="control-label">Label</label>
            <div class="controls">
                <input id="input1" type="text">
            </div>
        </div>

        <div class="control-group">
            <label for="input2" class="control-label">Label</label>
            <div class="controls">
                <input id="input2" type="text">
            </div>
        </div>
    </form>

     <!-- jQuery from Google CDN -->
     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
     <!-- jQuery UI from Google CDN -->
     <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Chr*_*ris 8

<div class="controls">
                <label for="input1" class="control-label">Label</label>
                <input id="input1" type="text">
 </div>
Run Code Online (Sandbox Code Playgroud)

这是你想要的?

编辑 来自输入div的外部的水平标签.

    <div class="control-group">
        <label for="input1" class="control-label col-sm-2">Label</label>
        <div class="controls col-sm-10">
            <input id="input1" type="text">
        </div>
    </div>
Run Code Online (Sandbox Code Playgroud)