将文本框排成一行的句子格式

问题描述 投票:0回答:1
html css bootstrap-4
1个回答
0
投票

<input>
已经是一个内联元素。为什么不简单地将它们全部放在同一列中而不将句子分成奇怪的列?

您不需要针对全角元素的特殊类。

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">

<div class="form-group row">
  <div class="col-sm-2">
    I,
  </div>

  <div class="col-sm-4">
    <input type="text" size="10" asp-for="FullName" class="form-control input-lg" />,
  </div>

  <div class="col-sm-6">
    hereby acknowledge that I understand my responsibility as an:
  </div>

  <div>
    I, <input type="text" size="10" asp-for="FullName" class="form-control input-lg" />, hereby acknowledge that I understand my responsibility as an:
  </div>
</div>

© www.soinside.com 2019 - 2024. All rights reserved.