【问题标题】:Reactjs integrating bootstrap componentsReactjs 集成引导组件
【发布时间】:2016-05-05 20:31:32
【问题描述】:

这是我的简单 jsx 文件,我正在尝试集成 bootstap 但组件未呈现 - 页面为空白。

var CreatePanel = React.createClass({ 
    render: function(){ 
        return <div className="row">
            Create Panel

            <div className = "col-xs-6 col-sm-3" style = "background-color: #dedef8;
                box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">

            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
            </div>
        </div>; 
    } 
}); 

var FilterPanel = React.createClass({ 
    render: function(){ 
        return <div className="row">Filter Panel</div>; 
    } 
}); 

React.render(<div class="container">
    <CreatePanel/>   
    <FilterPanel/> 
</div>
    , document.getElementById('react-container'));

【问题讨论】:

    标签: twitter-bootstrap reactjs


    【解决方案1】:

    您没有正确使用内联样式。请参阅此文档,让我知道这是否能解决您的问题。 https://facebook.github.io/react/tips/inline-styles.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-08
      • 2022-01-07
      • 1970-01-01
      • 1970-01-01
      • 2016-02-05
      • 1970-01-01
      • 1970-01-01
      • 2018-06-23
      相关资源
      最近更新 更多