0
我无法将我的<Paper>
居中放在div中。请帮助text-align for material ui
我找到<Paper>
和<RaisedButton>
内股利和使用CSS给:
.timerArea {
text-align: center;
}
对于按钮,它的作品,但对于纸 - 没有。
风格<Paper>
const timeArea = {
height: 150,
width: 150,
textAlign: 'center',
rounded: true,
paddingTop: 65,
backgroundColor: '#76D8E3',
opacity: 0.8
};
而且我的JSX:
<div className={styles.timerArea}>
<Paper style={timeArea} zDepth={1} circle>{stopWatchTime}</Paper>
<RaisedButton onClick={buttonRole} backgroundColor={buttonColor}>{buttonName}</RaisedButton>
</div>
感谢。在纸风格
尝试“保证金:汽车”纸风格 –
感谢,它的工作原理。 请将它写为答案,我将其标记为有用 –