0

我在 VueJs 中对齐 4 个输入文本时遇到问题。

在此处输入图像描述

我的容器 CSS

.step__field-container {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-pack: center;
    justify-content: center;
    -ms-flex-align: start;
    align-items: flex-start;
    width: 100%;
    max-width: 520px;
    margin: 40px auto auto;
}

我的输入 CSS

.input__field {
    width: 100%;
    height: 50px;
    max-width: 334px;
    background-color: #fff;
    border: 1px solid #e9e9e9;
    padding-left: 20px;
    font-size: 15px;
    line-height: 50px;
}

请帮助我们。

谢谢

4

1 回答 1

1

如果您希望每行固定两个输入字段,则以下代码可以解决问题。并且还推荐使用行/列 div。有关详细信息,请参见此处

.step__field-container

display: -ms-table;
display: table;

.input__field

width:50%;
于 2020-12-02T13:50:29.303 回答