CSS incomplete in itself

I was trying to create slider with only css and once I was succeed but it was not that much attractive. Responsive sliders could not be made by only css. I have to use jquery and some php scripts to make it responsive. I wanna know that if someone have created a slider with only css and that too with great effects.,

Try this one for your code.

HTML 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>

CSS code: 

@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: 30s slidy infinite; 
}

From http://dudleystorey.github.io/CSSslidy/ - attribution added by TechnoBear

Did you see this post?

@rapidsofttechnologie:

You seem to be using this slider, but without attribution

http://dudleystorey.github.io/CSSslidy/

It’s fine to link to a demo or other resource, but please don’t use somebody else’s work without giving them due credit.

You’ve also only provided part of the code; the demo requires some JavaScript (although not jQuery) and therefore doesn’t meet @bhagatwebcreation’s needs.

It can absolutely be done using pure CSS. You can also use transitions and CSS animations to add effects.

Here are a few that I have found.(Not created by myself, simply found and posting for informational use)

http://csscience.com/responsiveslidercss3/

http://damzaky2.blogspot.com/2013/06/pure-css-responsive-slider.html
http://benschwarz.github.io/gallery-css/#item-3

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.