Input group - two inputs close to each other

后端 未结 11 1094
刺人心
刺人心 2020-12-12 17:47

How can I make input group involves two inputs?

11条回答
  •  -上瘾入骨i
    2020-12-12 18:21

    It almost never makes intuitive sense to have two inputs next to each other without labels. Here is a solution with labels mixed in, which also works quite well with just a minor modification to existing Bootstrap styles.

    Preview: enter image description here

    HTML:

    Between and

    CSS:

    .input-group-addon {
      border-left-width: 0;
      border-right-width: 0;
    }
    .input-group-addon:first-child {
      border-left-width: 1px;
    }
    .input-group-addon:last-child {
      border-right-width: 1px;
    }
    

    JSFiddle: http://jsfiddle.net/yLvk5mn1/31/

提交回复
热议问题