使用:http : //www.material-ui.com/#/components/toolbar,向下滚动时如何使它可浮动?
我可以通过以下方式做到这一点:textAlign:'center', position: 'fixed', top: 0
但是,当我使用时<Toolbar/>
,它的大小会奇怪地调整。
您是否尝试过将宽度设置为100%?这为我工作:
<Toolbar
style={{
position: 'fixed',
top: 0,
width: '100%'
}}>
// Content
</Toolbar>
或者:
<Toolbar
style={{
position: 'fixed',
top: 0,
left: 0,
right: 0,
}}>
// Content
</Toolbar>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句