Skip to content

Instantly share code, notes, and snippets.

@uranaka
Last active June 16, 2021 07:44
Show Gist options
  • Save uranaka/749c9e3d1c8f5d23ee03e7901c11a65f to your computer and use it in GitHub Desktop.
Save uranaka/749c9e3d1c8f5d23ee03e7901c11a65f to your computer and use it in GitHub Desktop.
http://uranaka-shobou.com/css-slideshow/  CSSで作るスライドショーのCSS
#aspslide{
position: relative;
width: 300px;
height: 250px;
overflow:hidden;
padding:0!important;
}
.asnakami{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding:0!important;
}
#asnakami1{
-moz-animation: fadeinout 30s 0s infinite both;
-webkit-animation: fadeinout 30s 0s infinite both;
-o-animation: fadeinout 30s 0s infinite both;
animation: fadeinout 30s 0s infinite both;
z-index:6;
}
#asnakami2{
-moz-animation: fadeinout 30s 5s infinite both;
-webkit-animation: fadeinout 30s 5s infinite both;
-o-animation: fadeinout 30s 5s infinite both;
animation: fadeinout 30s 5s infinite both;
z-index:5;
}
#asnakami3{
-moz-animation: fadeinout 30s 10s infinite both;
-webkit-animation: fadeinout 30s 10s infinite both;
-o-animation: fadeinout 30s 10s infinite both;
animation: fadeinout 30s 10s infinite both;
z-index:4;
}
#asnakami4{
-moz-animation: fadeinout 30s 15s infinite both;
-webkit-animation: fadeinout 30s 15s infinite both;
-o-animation: fadeinout 30s 15s infinite both;
animation: fadeinout 30s 15s infinite both;
z-index:3;
}
#asnakami5{
-moz-animation: fadeinout 30s 20s infinite both;
-webkit-animation: fadeinout 30s 20s infinite both;
-o-animation: fadeinout 30s 20s infinite both;
animation: fadeinout 30s 20s infinite both;
z-index:2;
}
#asnakami6{
-moz-animation: fadeinout 30s 25s infinite both;
-webkit-animation: fadeinout 30s 25s infinite both;
-o-animation: fadeinout 30s 25s infinite both;
animation: fadeinout 30s 25s infinite both;
z-index:1;
}
@-moz-keyframes fadeinout {
0% { left:0%; opacity:0;}
5% { left:0%;opacity:1; }
20% { left:0%; opacity:1;}
25% { left:0%;opacity:0; }
26% { opacity:0;left:100%; }
99.99% { opacity:0;left:100%; }
100% { opacity:0;left:0%; }
}
@-webkit-keyframes fadeinout {
0% { left:0%; opacity:0;}
5% { left:0%;opacity:1; }
20% { left:0%; opacity:1;}
25% { left:0%;opacity:0; }
26% { opacity:0;left:100%; }
99.99% { opacity:0;left:100%; }
100% { opacity:0;left:0%; }
}
@-o-keyframes fadeinout {
0% { left:0%; opacity:0;}
5% { left:0%;opacity:1; }
20% { left:0%; opacity:1;}
25% { left:0%;opacity:0; }
26% { opacity:0;left:100%; }
99.99% { opacity:0;left:100%; }
100% { opacity:0;left:0%; }
}
@keyframes fadeinout {
0% { left:0%; opacity:0;}
5% { left:0%;opacity:1; }
20% { left:0%; opacity:1;}
25% { left:0%;opacity:0; }
26% { opacity:0;left:100%; }
99.99% { opacity:0;left:100%; }
100% { opacity:0;left:0%; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment