如何将列的内容垂直对齐到中心?引导

时间:2015-10-31 12:43:25

标签: javascript angularjs twitter-bootstrap-3

您好我需要将列的内容垂直对齐到中心。 这是我的表格的图像

Bootstrap form

代码:

<div class="row">
    <div class="form-group col-lg-2">
            <label translate="global.field.name" for="name">Name</label>
            <input type="text" class="form-control" />
    </div>
    <div class="form-group col-lg-2">
            <label translate="global.field.code" for="code">Code</label>
            <input type="text" class="form-control" />
    </div>
    <div class="form-group col-lg-2">
            <label translate="global.field.translation" for="translation">Translation</label>
            <input type="text" class="form-control" />
    </div>
    <div class="form-group col" >
            <button><span class="glyphicon glyphicon-remove"></span></button>
            <button><span class="glyphicon glyphicon-search"></span></button>
    </div>

如何将最后一列垂直对齐到中心?

2 个答案:

答案 0 :(得分:1)

您可以像这样使用flexbox ..

Public Function CreateFileJson_Stream(regions As Regions) As Long
        Dim sw As New Stopwatch
        sw.Start()
        Using stream = New StreamWriter("c:\atlas\regionsStream.json")
            Using writer = New JsonTextWriter(stream)
                writer.WriteStartArray()

                For Each item In regions
                    writer.WriteStartObject()
                    writer.WritePropertyName("Id")
                    writer.WriteValue(item.Id)
                    writer.WritePropertyName("Name")
                    writer.WriteValue(item.Name)
                    writer.WritePropertyName("FDS_Id")
                    writer.WriteValue(item.FDS_Id)
                    writer.WriteEndObject()
                Next

                writer.WriteEndArray()
            End Using
        End Using
        sw.Stop()
        Return sw.ElapsedMilliseconds
    End Function

http://codeply.com/go/Ak9iMhZAuH

答案 1 :(得分:0)

将此添加到要对齐的div:

/usr/bin/env: node'use strict';: This file or directory does'nt exist