react 添加样式

react添加style样式

var style={
            border:'1px solid #000',
            background:'red',
            '200px'
        };
        var Divider=React.createClass({
            
            render:function(){
                return (
                    <div style={style}>
                        <h2>{this.props.children}</h2>
                    </div>
                )
            }
        });
        React.render(
            <Divider>questions</Divider>,
            document.body
        )
如果问题,欢迎大家及时指点,一同交流,共同提高
原文地址:https://www.cnblogs.com/wujidns/p/5624212.html