html - 使标签与下面的语义 UI 宽度相同

标签 html css semantic-ui

如何像bootstrap一样让Label和输入框等宽,目前我的页面是这样的 enter image description here

<div class="three column row">
  <div class="left floated column">
    <div class="inline fields">
      <label style="width:128px;">Customer Code</label>
      <div class="ui input right icon">
        <i class="search icon"></i>
        <input type="text" id="CustomerCode" class="search" readonly name="card[number]" placeholder="">
      </div>
    </div>
    <div class="inline fields">
      <label style="width:128px;">Customer Name</label>
      <input type="text" name="card[number]" placeholder="">
    </div>
  </div>
  <div class="right floated column">
    <div class="inline fields">
      <label>Customer Name</label>
      <input type="text" name="card[number]" placeholder="">
    </div>
    <div class="inline fields">
      <label>Phone No</label>
      <input type="text" name="card[number]" placeholder="">
    </div>
  </div>
</div>

最佳答案

请试试这个。

<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.3/semantic.min.css" rel="stylesheet" />
<h1>Single</h1>
<div class="ui form">
  <div class="inline field">
  <label style="width:30%; text-align:right;">Last name Test</label>
  <input placeholder="Full Name" type="text">
  </div>
  <div class="inline field">
    <label style="width:30%; text-align:right;">Fast name Testing  </label>
    <input placeholder="Full Name" type="text">
  </div>
</div>

关于html - 使标签与下面的语义 UI 宽度相同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59168236/

相关文章:

javascript - 将多个 TD 插入表的中间

node.js - 如何安装和使用 semantic-ui-react

javascript - 带有附加查询参数的 src 的 js、img 和 link 标签

html - 嵌入操作按钮的先决条件

javascript - 谁能告诉我为什么我的按钮不显示内容?

html - 如何修复顶部栏菜单上的环形菜单被 Wordpress 中的图像阻挡?

jQuery easing vs CSS3 transition - 是否有完全等效的平滑?

javascript - 一个字段上的语义 ui 表单验证规则是否可以以不同的字段为条件?

javascript - 如何实现Semantic UI Site的粘性菜单

HTML 选择框 : combining background image with background color in IE