ReactJS + Redux - Material-UI:如何使 <Toolbar/> 可浮动?
ReactJS + Redux - Material-UI: How to make <Toolbar/> floatable?
Using: 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>
Using: 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>