Django ...旋转木马的静态图像

时间:2018-03-24 12:29:20

标签: javascript python django carousel

我正处于开发环境中开发网站的过程中,我在将照片显示在我的旋转木马上时遇到问题...我不知道python manage.py collectstatic是否会修复此问题但是这个是我的。我试图在settings.py文件夹中配置静态设置,但没有

carousel

这是我的代码

    $(document).ready(function() {
      var carousel = $("#carousel").featureCarousel({
        // include options like this:
        // (use quotes only for string values, and no trailing comma after last option)
        // option: value,
        // option: value
      });

      $("#but_prev").click(function () {
        carousel.prev();
      });
      $("#but_pause").click(function () {
        carousel.pause();
      });
      $("#but_start").click(function () {
        carousel.start();
      });
      $("#but_next").click(function () {
        carousel.next();
      });
    });
  
.carousel-container {
     position: relative;
     width: 960px;
 }

 #carousel {
     height: 280px;
     width: 960px;
     background-color: #CCC;
     position: relative;
     margin-bottom: 0.5em;
     font-size: 12px;
     font-family: Arial;
 }

 .carousel-image {
     border: 0;
     display: block;
 }

 .carousel-feature {
     position: absolute;
     top: -1000px;
     left: -1000px;
     border: 2px solid #5d5d5d;
     cursor: pointer;
 }

 .carousel-feature .carousel-caption {
     position: absolute;
     bottom: 0;
     width: 100%;
     background-color: #000;
 }

 .carousel-feature .carousel-caption p {
     margin: 0;
     padding: 5px;
     font-weight: bold;
     font-size: 12px;
     color: white;
 }

 .tracker-summation-container {
     position: absolute;
     color: white;
     right: 48px;
     top: 230px;
     padding: 3px;
     margin: 3px;
     background-color: #000;
 }

 .tracker-individual-container {
     position: absolute;
     color: white;
     right: 48px;
     top: 210px;
     padding: 0;
     margin: 0;
 }

 .tracker-individual-container li {
     list-style: none;
 }

 .tracker-individual-container .tracker-individual-blip {
     margin: 0 3px;
     padding: 0 3px;
     color: white;
     text-align: center;
     background-color: #DDD;
 }

 .tracker-individual-container .tracker-individual-blip-selected {
     color: white;
     font-weight: bold;
     background-color: #000;
 }

 #carousel-left {
     position: absolute;
     bottom: 33px;
     left: 220px;
     cursor: pointer;
 }

 #carousel-right {
     position: absolute;
     bottom: 33px;
     right: 220px;
     cursor: pointer;
 }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="container">
    <div class="row">
        <div class="col-lg-12"></div>
        <div id="woodgrain-backdrop">

            <img id="dreams_logo" class="center" src="{% static 'dream_app/images/main_logo.png' %}" alt="Dream_Logo">
        </div>
    </div>
    </div>
</div>

<a id="but_prev" href="#">PREV</a> | <a id="but_pause" href="#">PAUSE</a> | <a id="but_start" href="#">START</a> | <a id="but_next" href="#">NEXT</a> 
  
<div class="carousel-container">

  <div id="carousel">
    <div class="carousel-feature">
      <a href="#"><img class="carousel-image" alt="Image Caption" src="{% static '/dream_app/images/sample1.jpg' %}"></a>
      <div class="carousel-caption">
        <p>
          This area is typically used to display captions associated with the images. They are set to hide and fade in on rotation.
        </p>
      </div>
    </div>
    <div class="carousel-feature">
      <a href="#"><img class="carousel-image" alt="Image Caption" src="{% static '/dream_app/images/sample2.jpg' %}"></a>
      <div class="carousel-caption"></a>
      <div class="carousel-caption">
        <p>
          The background will expand up or down to fit the caption.
        </p>
      </div>
    </div>
    <div class="carousel-feature">
      <a href="#"><img class="carousel-image" alt="Image Caption" src="{% static '/dream_app/images/sample5.jpg' %}"></a>
      <div class="carousel-caption">"></a>
      <div class="carousel-caption">
        <p>
          Images can be placed here as well.
        </p>
      </div>
    </div>
    <div class="carousel-feature">
      <a href="#"><img class="carousel-image" alt="Image Caption" src="{% static '/dream_app/images/sample4.jpg' %}"></a>
      <div class="carousel-caption">"></a>
    </div>
    <div class="carousel-feature">
      <a href="#"><img class="carousel-image" alt="Image Caption" src="{% static '/dream_app/images/sample5.jpg' %}"></a>
      <div class="carousel-caption">"></a>
      <div class="carousel-caption">
        <p>
          The background color of the caption area can be changed using CSS. The opacity can be changed in the options, but it will also change the opacity of the text.
        </p>
      </div>
    </div>
  </div>

  <div id="carousel-left"><img src="{% static '/dream_app/images/arrow-left.png' %}" /></div>
  <div id="carousel-right"><img src="{% static '/dream_app/images/arrow-right.png' %}" /></div>
</div>

0 个答案:

没有答案