ReactJS中的Data-src / images

时间:2016-02-17 13:57:17

标签: javascript html css reactjs

我在幻灯片中显示图片时遇到问题。我基本上将索引页面切成碎片并将它们放入var中,我想使用react-routing使其工作。它确实(有点)

我有幻灯片部分 - 一切都很好,除了图像没有显示。 (只是图像 - 文字工作正常)

    var Slides = React.createClass({
  render : function() {
    return (
          <div class="container">
            <div class="row wrap">
              <div class="col-md-12 gallery"> 
                  <div class="camera_wrap camera_white_skin" id="camera_wrap_1">
                    <div data-thumb="" data-src="images/slides/blank.gif">
                    <img src="images/slides/blank.gif"/>
                      <div class="img-responsive camera_caption fadeFromBottom">
                        <h2>Great cars</h2>
                      </div>
                    </div>
                    <div data-thumb="" data-src="images/slides/blank.gif">
                      <div class="img-responsive camera_caption fadeFromBottom">
                        <h2>Fast cars</h2>
                      </div>
                    </div>
                    <div data-thumb="" data-src="images/slides/blank.gif">
                      <div class="img-responsive camera_caption fadeFromBottom">
                        <h2>Super cars</h2>
                      </div>
                    </div>
                    <div data-thumb="" data-src="images/slides/blank.gif">
                      <div class="img-responsive camera_caption fadeFromBottom">
                        <h2>We have it all!</h2>
                      </div>
                    </div>
                  </div>
              </div>
            </div>
          </div>
    );
  }
});

var App = React.createClass({
  render : function() {
    return (


        <div id="home">
          <div class="headerLine">
            <div id="menuF" class="default">
              <div class="container">
                <div class="row">

                  <Logo />
                  <Header />

                </div>
              </div>
            </div>

            <Slides />

            </div>
            <div class="container">
              <div class="row">
                <div class="col-md-12 cBusiness">

                  {this.props.children}

                </div>
              </div>
            </div>
        </div>

    )
  }
});

我在猜测,因为我是新手(和javascript)我可能不知道将这个DIV转换为JS代码的某种方式。

0 个答案:

没有答案