【问题标题】:What is the function of the tag <Container>?标签 <Container> 的作用是什么?
【发布时间】:2021-10-14 14:22:12
【问题描述】:

我正在阅读示例代码,但我不明白标签 &lt;Container&gt; 是什么 在这里做。

<Container maxWidth="lg">
  <AppBar className={classes.appBar} position="static" color="inherit">
    <Typography className={classes.heading} variant="h2" align="center">Memories</Typography>
    <img className={classes.image} src={memories} alt="icon" height="60" />
  </AppBar>
  <Grow in>
<Container>
^^^^^^^^^^^

我查了一下,结果都是关于HTML中的contianer标签和js中的函数,其中不包括看起来像&lt;Container&gt;的标签。似乎我也无法搜索单词 &lt;Container&gt; ,谷歌搜索只是忽略了符号 &lt;&gt;。我不知道如何反驳。

【问题讨论】:

  • 这不是纯 HTML
  • 这些是 React 组件吗?听起来您正在查看代码而不知道它使用的是什么技术,这肯定会阻碍您的搜索。

标签: javascript html tags containers


【解决方案1】:

好吧,原来是material-ui中的一个组件。

这里是文档:https://mui.com/components/container/

容器将您的内容水平居中。这是最基本的 布局元素。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-30
    • 2011-05-27
    • 2016-09-27
    • 2021-10-11
    • 1970-01-01
    • 2010-10-16
    • 2010-09-05
    相关资源
    最近更新 更多