Results 1 to 2 of 2

Thread: CSS Slider

  1. #1
    Join Date
    Mar 2016
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Slider

    Here are the two versions: First the CSS and my own new code for my own images (the next example is with the coders original images) With my version the last image just flashes a halv second or so ... But not with the original images ... Why is that?
    Code:
    <style>
    @keyframes slidy {
      0% {
        left: 0%;
      }
      20% {
        left: 0%;
      }
      25% {
        left: -100%;
      }
      45% {
        left: -100%;
      }
      50% {
        left: -200%;
      }
      70% {
        left: -200%;
      }
      75% {
        left: -300%;
      }
      95% {
        left: -300%;
      }
      100% {
        left: -400%;
      }
    }
    
    body {
      margin: 0;
    }
    
    div#slider {
      overflow: hidden;
    }
    
    div#slider figure img {
      width: 20%;
      float: left;
    }
    
    div#slider figure {
      position: relative;
      width: 500%;
      margin: 0;
      left: 0;
      text-align: left;
      font-size: 0;
      animation: 10s slidy infinite;
    }
    
    
    </style>
    </head>
    
    <body>
    <div id="slider">
      <figure>
    <img src="images/image11.jpg" alt="">
    <img src="images/image12.jpg" alt="">
    <img src="images/image13.jpg" alt="">
    <img src="images/image14.jpg" alt="">
    <img src="images/image14.jpg" alt="">
    </figure>
    </div>
    ...............................................................................................................................

    Using the same CSS
    Code:
    <div id="slider">
    <figure>
    <img src="http://demosthenes.info/assets/images/austin-fireworks.jpg" alt="">
    <img src="http://demosthenes.info/assets/images/taj-mahal.jpg" alt="">
    <img src="http://demosthenes.info/assets/images/ibiza.jpg" alt="">
    <img src="http://demosthenes.info/assets/images/ankor-wat.jpg" alt="">
    <img src="http://demosthenes.info/assets/images/austin-fireworks.jpg" alt="">
    </figure>
    </div>
    Last edited by Beverleyh; 03-13-2016 at 05:30 PM. Reason: Formatting

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I don't really understand what you're describing. You also don't say if the issue is only present in particular browser or OS.

    Also, the last block of code has the same image in the first and last spot - does that have any bearing on what you are trying to describe?

    A live web page would be best to illustrate the issue and save us from having to construct a page on your behalf. If you haven't got your own web space, please use a free service such as JSBin, JSFiddle or CodePen
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. Featured Content Slider. Youtube video donīt stop when slider changes
    By Vlack in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 06-15-2011, 09:54 AM
  2. slider
    By silver163 in forum JavaScript
    Replies: 0
    Last Post: 10-30-2009, 03:59 AM
  3. Featured Content Slider: slider on top of slideshow
    By chechu in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 07-20-2009, 06:03 PM
  4. Featured Content Slider v2.4 - one slider with several paginate-slider
    By beathead in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 08-05-2008, 09:05 AM
  5. Featured Content Slider v2.0 - slider height fixed ?
    By ptengler in forum Dynamic Drive scripts help
    Replies: 8
    Last Post: 06-26-2008, 07:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •