2017-08-08 38 views
0

想知道如何自定義根元素的對話框Material-ui.com自定義根元素

http://www.material-ui.com/#/components/dialog犯規解釋如何添加一個類的根元素

root: { 
    position: 'fixed', 
    boxSizing: 'border-box', 
    WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) 
    zIndex: zIndex.dialog, 
    top: 0, 
    left: open ? 0 : -10000, 
    width: '100%', 
    height: '100%', 
    transition: open ? 
    transitions.easeOut('0ms', 'left', '0ms') : 
    transitions.easeOut('0ms', 'left', '450ms'), 
}, 

我想編輯一些在該div中的價值,但不能找到一種方法來做到這一點。

+0

http://www.material-ui.com/#/customization樣式應用於根或其他水木清華/ styles「總是提供'style'屬性並將其應用於根元素。」 – Clavin

回答

0

bodyClassName - 要在標題下添加到內容根元素的className。 contentClassName - 要添加到內容容器的className。

這個屬性可以被應用到<Dialog />,設置正確的類名的特定元素,因此,你可以通過CSS