[英]Material-UI: How to make aligned form
I'm new to Material-UI.我是 Material-UI 的新手。 How does one typically build a form, where some fields are grouped horizontally while others are stacked vertically and all the fields aligns nicely both vertically and horizontally?
通常如何构建一个表单,其中一些字段水平分组,而另一些字段垂直堆叠,并且所有字段在垂直和水平方向上都很好地对齐? See the following example picture:
请参阅以下示例图片:
I know how to build this kind of form with plain HTML tables, but what is the "correct" Material-UI way?我知道如何使用纯 HTML 表格构建这种表单,但“正确”的 Material-UI 方式是什么? Example code would be nice.
示例代码会很好。
Here you have a sample for the first two rows:这里有前两行的示例:
<form>
<Grid container>
<Grid item xs="12">
<TextField id="standard-basic" label="Standard"/>
</Grid>
</Grid>
<Grid container>
<Grid item xs="8">
<TextField id="standard-basic" label="Standard"/>
</Grid>
<Grid item xs="4">
<TextField id="standard-basic" label="Standard"/>
</Grid>
</Grid>
</form>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.