[英]With react and material-ui, can I have some paper expand to full width outside a Container?
如果我有:
<Container maxWidth='lg'>
<Grid container spacing={3}>
<Grid item xs={12} md={6} >
<Image src="/img/undraw_programming_2svr.png" color='transparent' aspectRatio={1041 / 554} />
</Grid>
<SomeElement />
</Container>
如何讓SomeElement
擴展到全寬?
首先,已經提到的幾件事,您的網格標記是錯誤的,我知道這是一個錯誤,可能對您的問題並不重要。
您的問題的答案是否定的,容器的目的是阻止 SomeElement 擴展。 然而,一個簡單的解決方法是停止容器,渲染 SomeElement,然后啟動一個新容器。
<Container>
...
</Container>
<SomeElement />
<Container>
...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.