2016-06-12 51 views
0

這是我第一次使用Material UI(或前端世界)進行反應。實際上它表現很好,但我注意到我的標題中有白色的空白。在MaterialUI AppBar中存在空白

enter image description here

這裏是我的index.js加載MuiTheme:

const muiTheme = getMuiTheme({ 
    palette: { 
    textColor: teal500, 
    }, 
}); 

render(
    <MuiThemeProvider muiTheme={muiTheme}> 
    <Provider store={store}> 
     <Router history={browserHistory} routes={routes} /> 
    </Provider> 
    </MuiThemeProvider>, 
    document.getElementById('app') 
); 

是否有一個造型,我需要申請嗎?

謝謝!

回答

0

您應該添加body { margin: 0; }到您的CSS。

+0

仍然不起作用。 –

+0

對不起,那是我的錯。你是對的。此問題與此類似:http://stackoverflow.com/questions/34716654/how-to-make-an-appbar-component-fill-all-divs-width-and-10-of-its-height?rq = 1 –