マテリアルUIスナックバーに複数の背景色を適用するにはどうすればよいですか?私は以下に述べるように線形勾配で試しましたが、うまくいきません。あなたのCSSに若干の誤差を持っているマテリアルUIスナックバーに複数の背景色を適用できません
import Snackbar from 'material-ui/Snackbar';
const bodyStyle = {
border: `2px solid ${config.actualWhite}`,
minWidth: '50%',
maxWidth: '100%',
height:'55px',
backgroundColor: 'linear-gradient(to right bottom, #00897B, #FFE082)',
fontFamily: config.fontFamily,
fontStyle: config.fontStyle,
fontWeight: config.fontWeight,
fontSize: config.fontSize
}
<Snackbar
open={this.state.openLogout}
message="You are Successfuly loggedout! Thanks for being part of web Family!"
autoHideDuration={4000}
bodyStyle={bodyStyle}
action="Close"
onRequestClose={this.handleRequestClose}
onActionTouchTap={this.handleRequestClose}
style={myTheme.snackbarfromTop}
/>
backgroundColorを線形グラデーションカラーの背景に変更すると、私にとって効果があります。添付のsnackbarイメージを参照してください。 –