调整两个文本框的宽度

时间:2019-08-14 04:29:13

标签: css bootstrap-4 width

我是html表单设计器的初学者,我想在html中创建一个简单的⚡ root@dummyserver ~ cd gitrepo ⚡ root@dummyserver ~/gitrepo git clone https://ourbitbucket.dummy/vcs/scm/devops/docker-builds.git Cloning into 'docker-builds'... fatal: unable to access 'https://ourbitbucket.dummy/vcs/scm/devops/docker-builds.git/': The requested URL returned error: 403 ✘ ⚡ root@dummyserver ~/gitrepo  ✘ ⚡ root@dummyserver ~/gitrepo telnet ourbitbucket.dummy 443 Trying 10.82.25.14... Connected to ourbitbucket.dummy. Escape character is '^]'. ^CConnection closed by foreign host. ✘ ⚡ root@dummyserver ~/gitrepo cd .. ⚡ root@dummyserver ~ java SSLPoke ourbitbucket.dummy 443 Successfully connected ,其输出与 width 文本框不同 也就是说,姓氏文本框较短,而 FullName 较长 你能建议怎么做吗?

input-group

2 个答案:

答案 0 :(得分:1)

尝试一下。

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="row h-100">
  <div class="col">
    <div class="input-group">
      <div class="input-group-prepend">
        <span class="input-group-text" id="">First and last name</span>
      </div>
      <input type="text" id="surname" class="form-control" placeholder="Mr" style="width:80px;flex-grow: 0;">
      <input type="text" id="FullName" class="form-control" placeholder="">
    </div>
  </div>

答案 1 :(得分:0)

您忘记在姓氏class="form-control"

中删除此在此处输入代码文本

<div class="row h-100">
    <div class="col">
      <div class="input-group">
        <div class="input-group-prepend">
          <span class="input-group-text" id="">First and last name</span>
        </div>
        <input type="text" id="surname" class="form-control" style="width:80px">
        <input type="text" id="FullName" class="form-control" style="width:100%">
      </div>
    </div>
  </div>