Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何使以下输入区域扩展到屏幕的末尾?_Html_Css_Flexbox - Fatal编程技术网

Html 如何使以下输入区域扩展到屏幕的末尾?

Html 如何使以下输入区域扩展到屏幕的末尾?,html,css,flexbox,Html,Css,Flexbox,这是一种类似引导的形式: HTML: 结果是: 我希望第一行和第三行的输入到达container div的末尾(不要与其相邻行水平堆叠) 我试过这个: .row-group { input: flex: 1 1 100% } 但什么都不动 做这件事的正确方法是什么?请看看这把小提琴——这就是你要找的吗? 以下是修改后的CSS: .row { xdisplay: flex; } .row-group { display: flex; flex-direction: row

这是一种类似引导的形式:

HTML:

结果是:

我希望第一行和第三行的输入到达container div的末尾(不要与其相邻行水平堆叠)

我试过这个:

.row-group {
  input: flex: 1 1 100%
}
但什么都不动


做这件事的正确方法是什么?

请看看这把小提琴——这就是你要找的吗?

以下是修改后的CSS:

.row {
  xdisplay: flex;
}

.row-group {
  display: flex;
  flex-direction: row !important;
  align-items: center;
}

  label {
    flex: 0 0 100px;
  }

  input {
    width: 100%;
    box-sizing: border-box;
    flex: 1;
  }

.form-group {
  flex: 1 0 0;
  flex-direction: column;
}
我修复了CSS的几个问题: 1) 输入元素后的额外闭合支架 2) .row组后面缺少括号 3) 添加了“宽度:100%”属性和“框大小:边框框” 4) 左浮动标签。 5) 注释掉.row上的“display:flex”(不需要)


希望这能有所帮助。

请查看这把小提琴-这就是你想要的吗?

以下是修改后的CSS:

.row {
  xdisplay: flex;
}

.row-group {
  display: flex;
  flex-direction: row !important;
  align-items: center;
}

  label {
    flex: 0 0 100px;
  }

  input {
    width: 100%;
    box-sizing: border-box;
    flex: 1;
  }

.form-group {
  flex: 1 0 0;
  flex-direction: column;
}
我修复了CSS的几个问题: 1) 输入元素后的额外闭合支架 2) .row组后面缺少括号 3) 添加了“宽度:100%”属性和“框大小:边框框” 4) 左浮动标签。 5) 注释掉.row上的“display:flex”(不需要)


希望这能有所帮助。

你能解释一下你所说的类似于引导的表单是什么意思吗?你能解释一下类似于引导的表单是什么意思吗??哦,忽略关于浮动的注释-看起来我最终删除了它。哦,忽略关于浮动的注释-看起来我最终删除了它。
.row {
  xdisplay: flex;
}

.row-group {
  display: flex;
  flex-direction: row !important;
  align-items: center;
}

  label {
    flex: 0 0 100px;
  }

  input {
    width: 100%;
    box-sizing: border-box;
    flex: 1;
  }

.form-group {
  flex: 1 0 0;
  flex-direction: column;
}