CSS Keyframe not working with CSS image slideshow - html

i am trying to get a css slideshow working and i cannot see why it is not. The fault is in the keyframes. I am trying to get the images to come down from the top mask, and then once hidden, the previous image will go back up into the mask. This only works on keyframes 1 and 2. I cannot see why. My coursework deadline is soon, please help!
CSS code:
#content {
background-color: white;
/* border: 1px solid black; */
padding: 0;
width: 100%;
-webkit-box-shadow: 0px 0px 30px 4px #acafb3;
-moz-box-shadow: 0px 0px 30px 4px #acafb3;
box-shadow: 0px 0px 30px 4px #acafb3;
}
#slider {
background-image: url('images/ssgbritain.jpg');
border: 5px solid #eaeaea;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
height: 265px;
width: 998px;
overflow: visible;
position: relative;
}
#fig-container {
margin:0;
padding:0;
position:relative;
}
#mask {
overflow: hidden;
height: 270px;
}
#slider figure {
width: 998px;
/* Width Image */
height: 265px;
/* Height Image */
position: absolute;
top: -270px;
/* Original Position - Outside of the Slider */
}
figure:nth-child(1) {
animation:cycle 25s linear infinite;
-moz-animation:cycle 25s linear infinite;
-webkit-animation:cycle 25s linear infinite;
}
figure:nth-child(2) {
animation:cycle2 25s linear infinite;
-moz-animation:cycle2 25s linear infinite;
-webkit-animation:cycle2 25s linear infinite;
}
figure:nth-child(3) {
animation:cycle3 25s linear infinite;
-moz-animation:cycle3 25s linear infinite;
-webkit-animation:cycle3 25s linear infinite;
}
figure:nth-child(4) {
animation:cycle4 25s linear infinite;
-moz-animation:cycle4 25s linear infinite;
-webkit-animation:cycle4 25s linear infinite;
}
figure:nth-child(5) {
animation:cycle5 25s linear infinite;
-moz-animation:cycle5 25s linear infinite;
-webkit-animation:cycle5 25s linear infinite;
}
#keyframes cycle {
0% {
top: 0px;
}
25% {
top: 0px;
}
26% {
top: -270px;
}
96% {
top: -270px;
}
100% {
top: 0px;
}
}
#-webkit-keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
25% {
top: 0px;
}
26% {
top: -270px;
}
96% {
top: -270px;
}
100% {
top: 0px;
}
}
#keyframes cycle2 {
0% {
top: -270px;
}
20% {
top: -270px;
}
24% {
top: 0px;
}
41% {
top: 0px;
}
42% {
top: -270px;
}
100% {
top: -270px;
}
}
#-webkit-keyframes cycle2 {
0% {
top: -270px;
}
20% {
top: -270px;
}
24% {
top: 0px;
}
41% {
top: 0px;
}
42% {
top: -270px;
}
100% {
top: -270px;
}
#keyframes cycle3 {
0% {
top: -270px;
}
36% {
top: -270px;
}
40% {
top: 0px;
}
61% {
top: 0px;
}
62% {
top: -270px;
}
100% {
top: -270px;
}
}
#-webkit-keyframes cycle3 {
0% {
top: -270px;
}
36% {
top: -270px;
}
40% {
top: 0px;
}
61% {
top: 0px;
}
62% {
top: -270px;
}
100% {
top: -270px;
}
#keyframes cycle4 {
0% {
top: -270px;
}
52% {
top: -270px;
}
56% {
top: 0px;
}
81% {
top: 0px;
}
82% {
top: -270px;
}
100% {
top: -270px;
}
}
#-webkit-keyframes cycle4 {
0% {
top: -270px;
}
56% {
top: -270px;
}
60% {
top: 0px;
}
81% {
top: 0px;
}
82% {
top: -270px;
}
100% {
top: -270px;
}
}
#keyframes cycle5 {
0% {
top: -270px;
}
68% {
top: -270px;
}
72% {
top: 0px;
}
100% {
top: 0px;
}
}
#-webkit-keyframes cycle5 {
0% {
top: -270px;
}
76% {
top: -270px;
}
80% {
top: 0px;
}
92% {
top: 0px;
}
96 % {
top: -270px;
}
100% {
top: -270px;
}
}`
HTML code:
<div id="content">
<div id="slider">
<div id="mask">
<div id="fig-container">
<figure>
<img src="http://coursework/web/images/shopping.jpg" alt="Shopping centre" />
<figcaption>rger</figcaption>
</figure>
<figure>
<img src="http://coursework/web/images/ssgbritain.jpg" alt="SS Great Britain" />
<figcaption>rger</figcaption>
</figure>
<figure>
<img src="http://coursework/web/images/susbridge.jpg" alt="Suspension Bridge" />
<figcaption>rger</figcaption>
</figure>
<figure>
<img src="http://coursework/web/images/xmasmarket.jpg" alt="Suspension Bridge" />
<figcaption>rger</figcaption>
</figure>
</div>
</div>
</div>
P.s ignore the bad positioning of the image, seems to only be like that on jsfiddle.

Check this fiddle
You have errors in your css!! Simple as that, just checking the identation you will figure it out.
#-webkit-keyframes cycle3 is never closing!
#keyframes cycle {
0% {
top: 0px;
}
25% {
top: 0px;
}
26% {
top: -270px;
}
96% {
top: -270px;
}
100% {
top: 0px;
}
}
#-webkit-keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
25% {
top: 0px;
}
26% {
top: -270px;
}
96% {
top: -270px;
}
100% {
top: 0px;
}
}
#keyframes cycle2 {
0% {
top: -270px;
}
20% {
top: -270px;
}
24% {
top: 0px;
}
41% {
top: 0px;
}
42% {
top: -270px;
}
100% {
top: -270px;
}
}
#-webkit-keyframes cycle2 {
0% {
top: -270px;
}
20% {
top: -270px;
}
24% {
top: 0px;
}
41% {
top: 0px;
}
42% {
top: -270px;
}
100% {
top: -270px;
}
}
#keyframes cycle3 {
0% {
top: -270px;
}
36% {
top: -270px;
}
40% {
top: 0px;
}
61% {
top: 0px;
}
62% {
top: -270px;
}
100% {
top: -270px;
}
}
#-webkit-keyframes cycle3 {
0% {
top: -270px;
}
36% {
top: -270px;
}
40% {
top: 0px;
}
61% {
top: 0px;
}
62% {
top: -270px;
}
100% {
top: -270px;
}
}
#keyframes cycle4 {
0% {
top: -270px;
}
52% {
top: -270px;
}
56% {
top: 0px;
}
81% {
top: 0px;
}
82% {
top: -270px;
}
100% {
top: -270px;
}
}
#-webkit-keyframes cycle4 {
0% {
top: -270px;
}
56% {
top: -270px;
}
60% {
top: 0px;
}
81% {
top: 0px;
}
82% {
top: -270px;
}
100% {
top: -270px;
}
}
#keyframes cycle5 {
0% {
top: -270px;
}
68% {
top: -270px;
}
72% {
top: 0px;
}
100% {
top: 0px;
}
}
#-webkit-keyframes cycle5 {
0% {
top: -270px;
}
76% {
top: -270px;
}
80% {
top: 0px;
}
92% {
top: 0px;
}
96% {
top: -270px;
}
100% {
top: -270px;
}
}

Related

Text Slider built with CSS animation not showing on mobile

I'm working on my first portfolio website and wanted to add a text slider on the homepage that would cycle through a list.
Published draft is here: https://ryanpearson.website/
On desktop the list cycles through fine. When I use Chrome devtools to inspect and change screen size down to mobile, the list cycles fine. However, when I load the page on an actual cell phone or tablet, instead of using responsive sizing w/ devtools, the slider portion of this text disappears. I cant figure out why.
I thought maybe it was the elements needing a defined height, or that some of my animation isn't supported. . . but the phone i'm using is an iPHone XS, and the newest iPad.
HTML and CSS:
<div class="container-banner-text">
<span class="banner-text">Hi, I'm Ryan and I
<br>
<div class="content-slider">
<div class="slider">
<div class="mask">
<ul>
<li class="anim1">
<div class="quote">am a jr web dev.</div>
</li>
<li class="anim2">
<div class="quote">love learning.</div>
</li>
<li class="anim3">
<div class="quote">love organization.</div>
</li>
<li class="anim4">
<div class="quote">love beautiful design.</div>
</li>
<li class="anim5">
<div class="quote">love efficiency.</div>
</li>
</ul>
</div>
</div>
</div>
</span>
</div>
.container-banner-text {
position: absolute;
top:40%;
text-align: center;
width:100%;
}
.banner-text {
color: rgba(var(--white), 1);
font-family: Roboto, sans-serif ;
font-size: 2.5rem;
font-weight: 400;
margin:auto;
}
/* text carousel */
.slider {
text-align: center;
margin: 0 auto;
position: relative;
}
.mask {
overflow: hidden;
height: 45vh;
}
.slider ul {
margin: 0;
padding: 0;
position: relative;
}
.slider li {
position: absolute;
list-style: none;
margin:auto;
text-align:center;
width:100%;
background: rgba(var(--white), 1);
background: -webkit-linear-gradient(right, rgba(var(--red),1), rgba(var(--orange),1),rgba(var(--gold),1));
background-clip: border-box;
background-clip: text ;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.slider li.anim1 {
animation: cycle 15s linear infinite;
}
.slider li.anim2 {
animation: cycle2 15s linear infinite;
}
.slider li.anim3 {
animation: cycle3 15s linear infinite;
}
.slider li.anim4 {
animation: cycle4 15s linear infinite;
}
.slider li.anim5 {
animation: cycle5 15s linear infinite;
}
.slider:hover li {
animation-play-state: paused;
}
#keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
16% {
top: 0px;
opacity: 1;
z-index: 0;
}
20% {
top: 325px;
opacity: 0;
z-index: 0;
}
21% {
top: -325px;
opacity: 0;
z-index: -1;
}
50% {
top: -325px;
opacity: 0;
z-index: -1;
}
92% {
top: -325px;
opacity: 0;
z-index: 0;
}
96% {
top: -325px;
opacity: 0;
}
100% {
top: 0px;
opacity: 1;
}
}
#keyframes cycle2 {
0% {
top: -325px;
opacity: 0;
}
16% {
top: -325px;
opacity: 0;
}
20% {
top: 0px;
opacity: 1;
}
24% {
top: 0px;
opacity: 1;
}
36% {
top: 0px;
opacity: 1;
z-index: 0;
}
40% {
top: 325px;
opacity: 0;
z-index: 0;
}
41% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#keyframes cycle3 {
0% {
top: -325px;
opacity: 0;
}
36% {
top: -325px;
opacity: 0;
}
40% {
top: 0px;
opacity: 1;
}
44% {
top: 0px;
opacity: 1;
}
56% {
top: 0px;
opacity: 1;
z-index: 0;
}
60% {
top: 325px;
opacity: 0;
z-index: 0;
}
61% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#keyframes cycle4 {
0% {
top: -325px;
opacity: 0;
}
56% {
top: -325px;
opacity: 0;
}
60% {
top: 0px;
opacity: 1;
}
64% {
top: 0px;
opacity: 1;
}
76% {
top: 0px;
opacity: 1;
z-index: 0;
}
80% {
top: 325px;
opacity: 0;
z-index: 0;
}
81% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#keyframes cycle5 {
0% {
top: -325px;
opacity: 0;
}
76% {
top: -325px;
opacity: 0;
}
80% {
top: 0px;
opacity: 1;
}
84% {
top: 0px;
opacity: 1;
}
96% {
top: 0px;
opacity: 1;
z-index: 0;
}
100% {
top: 325px;
opacity: 0;
z-index: 0;
}
}

CSS3 animation make a stop delay between frames

I'm trying to animate my logo using css, what I want is each logo fade in from top then stop in a certain point, then fade out to bottom, but couldn't make this, is this possible?
.logo {
width: 50px;
height: 50px;
background: whitesmoke;
transform: rotate(45deg);
position: absolute;
border-radius: 5px;
border: 2px solid white;
}
#logo {
width: 500px;
height: 500px;
margin: auto;
margin-top: 100px;
position: relative;
}
#logo-1 {
top: 0px;
animation: loading3 4s linear infinite normal;
}
#logo-2 {
top: -10px;
animation: loading2 3s linear infinite normal;
}
#logo-3 {
top: -20px;
animation: loading1 2s linear infinite normal;
}
#keyframes loading1 {
0% {background: white;opacity: 0;top: -120px;}
50% {background:#f44;opacity: 1;top: -50px;}
65% {background:#f44;opacity: 1;top: -20px;}
75% {background:#f44;opacity: 1;top: -20px;}
100% {background: white;opacity: 0;top: 50px;}
}
#keyframes loading2 {
0% {background: white;opacity: 0;top: -120px;}
50% {background:#f44;opacity: 1;top: -50px;}
65% {background:#f44;opacity: 1;top: -10px;}
75% {background:#f44;opacity: 1;top: -10px;}
100% {background: white;opacity: 0;top: 50px;}
}
#keyframes loading3 {
0% {background: white;opacity: 0;top: -120px;}
50% {background:#f44;opacity: 1;top: -50px;}
65% {background:#f44;opacity: 1;top: 0px;}
75% {background:#f44;opacity: 1;top: 0px;}
100% {background: white;opacity: 0;top: 50px;}
}
<div id="logo">
<div class="logo" id="logo-1"></div>
<div class="logo" id="logo-2"></div>
<div class="logo" id="logo-3"></div>
</div>
Note: logo-3 should come first and stop, then logo-2 come and stop,
then logo-1 come and stop then logo-3 should go first, then logo-2
then logo-1, one by one.
Original logo is:
There is no way to stop a CSS animation in-between and then continue, hence i have used little JavaScript.
What we do is, we divide all three animations into two portions, the first one for all three runs and then the second one. I have divided animations and then activate those animations using classes with JavaScript. This solution is not complex, it's just lengthy.
function animateLogo() {
logo1 = document.getElementById('logo-1');
logo2 = document.getElementById('logo-2');
logo3 = document.getElementById('logo-3');
if(logo1.classList.contains('anim31')) {
logo1.classList.remove('anim31');
logo1.classList.add('anim32');
} else {
logo1.classList.add('anim31');
logo1.classList.remove('anim32');
}
if(logo2.classList.contains('anim21')) {
logo2.classList.remove('anim21');
logo2.classList.add('anim22');
} else {
logo2.classList.add('anim21');
logo2.classList.remove('anim22');
}
if(logo3.classList.contains('anim11')) {
logo3.classList.remove('anim11');
logo3.classList.add('anim12');
} else {
logo3.classList.add('anim11');
logo3.classList.remove('anim12');
}
}
setInterval(animateLogo, 3000); // The time is the amount of milliseconds our longest animation will take i.e 3s
.logo {
width: 50px;
height: 50px;
background: whitesmoke;
transform: rotate(45deg);
position: absolute;
border-radius: 5px;
border: 2px solid white;
}
#logo {
width: 500px;
height: 500px;
margin: auto;
margin-top: 100px;
position: relative;
}
#logo-1 {
top: 0px;
}
#logo-1.anim31 {
animation: loading31 3s linear forwards normal;
}
#logo-1.anim32 {
animation: loading32 1s linear forwards normal;
}
#keyframes loading31 {
0% {
background: white;
opacity: 0;
top: -120px;
}
65% {
background: #f44;
opacity: 1;
top: -50px;
}
75% {
top: -50px;
}
100% {
background: #f44;
opacity: 1;
top: 0px;
}
}
#keyframes loading32 {
0% {
background: #f44;
opacity: 1;
top: 0px;
}
65% {
background: #f44;
opacity: 1;
top: 0px;
}
100% {
background: white;
opacity: 0;
top: 50px;
}
}
#logo-2 {
top: -10px;
}
#logo-2.anim21 {
animation: loading21 2s linear forwards normal;
}
#logo-2.anim22 {
animation: loading22 2s linear forwards normal;
}
#keyframes loading21 {
0% {
background: white;
opacity: 0;
top: -120px;
}
65% {
background: #f44;
opacity: 1;
top: -50px;
}
75% {
top: -50px;
}
100% {
background: #f44;
opacity: 1;
top: -10px;
}
}
#keyframes loading22 {
0% {
background: #f44;
opacity: 1;
top: -10px;
}
65% {
background: #f44;
opacity: 1;
top: -10px;
}
100% {
background: white;
opacity: 0;
top: 50px;
}
}
#logo-3 {
top: -20px;
}
#logo-3.anim11 {
animation: loading11 1s linear forwards normal;
}
#logo-3.anim12 {
animation: loading12 3s linear forwards normal;
}
#keyframes loading11 {
0% {
background: white;
opacity: 0;
top: -120px;
}
65% {
background: #f44;
opacity: 1;
top: -50px;
}
75% {
top: -50px;
}
100% {
background: #f44;
opacity: 1;
top: -20px;
}
}
#keyframes loading12 {
0% {
background: #f44;
opacity: 1;
top: -20px;
}
65% {
background: #f44;
opacity: 1;
top: -20px;
}
100% {
background: white;
opacity: 0;
top: 50px;
}
}
<body>
<div id="logo">
<div class="logo anim31" id="logo-1"></div>
<div class="logo anim21" id="logo-2"></div>
<div class="logo anim11" id="logo-3"></div>
</div>
</body>
I hope this is the expected result. If not, please comment below and i will edit the answer.
P.S: Play around with the timing of animations to make it faster/slower.

CSS Text carousel with fixed text

I am trying to recreate a effect found on this page
I searched the web and found something and try to adjust it. But i can't figure out how to align that the text to look like in the example.
I am trying to modify the example but if there is a better practice that u can show me that's even better.
Some help to find documentation about it would be apprenticed to.
html,
body {
font-family: 'Droid Serif', serif;
}
.slider {
height: 320px;
width: 680px;
margin-left: 50px;
overflow: visible;
position: 0%;
}
.mask {
overflow: hidden;
height: 320px;
}
.slider ul {
margin: 0;
padding: 0;
position: relative;
}
.slider li {
width: 680px;
height: 320px;
position: absolute;
top: -325px;
list-style: none;
}
.slider .quote {
font-size: 40px;
font-style: italic;
}
.slider li.anim1 {
-moz-animation: cycle 15s linear infinite;
-webkit-animation: cycle 15s linear infinite;
animation: cycle 15s linear infinite;
}
.slider li.anim2 {
-moz-animation: cycle2 15s linear infinite;
-webkit-animation: cycle2 15s linear infinite;
animation: cycle2 15s linear infinite;
}
.slider li.anim3 {
-moz-animation: cycle3 15s linear infinite;
-webkit-animation: cycle3 15s linear infinite;
animation: cycle3 15s linear infinite;
}
.slider li.anim4 {
-moz-animation: cycle4 15s linear infinite;
-webkit-animation: cycle4 15s linear infinite;
animation: cycle4 15s linear infinite;
}
.slider li.anim5 {
-moz-animation: cycle5 15s linear infinite;
-webkit-animation: cycle5 15s linear infinite;
animation: cycle5 15s linear infinite;
}
.slider:hover li {
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
#-moz-keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
16% {
top: 0px;
opacity: 1;
z-index: 0;
}
20% {
top: 325px;
opacity: 0;
z-index: 0;
}
21% {
top: -325px;
opacity: 0;
z-index: -1;
}
92% {
top: -325px;
opacity: 0;
z-index: 0;
}
96% {
top: -325px;
opacity: 0;
}
100% {
top: 0px;
opacity: 1;
}
}
#-moz-keyframes cycle2 {
0% {
top: -325px;
opacity: 0;
}
16% {
top: -325px;
opacity: 0;
}
20% {
top: 0px;
opacity: 1;
}
24% {
top: 0px;
opacity: 1;
}
36% {
top: 0px;
opacity: 1;
z-index: 0;
}
40% {
top: 325px;
opacity: 0;
z-index: 0;
}
41% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-moz-keyframes cycle3 {
0% {
top: -325px;
opacity: 0;
}
36% {
top: -325px;
opacity: 0;
}
40% {
top: 0px;
opacity: 1;
}
44% {
top: 0px;
opacity: 1;
}
56% {
top: 0px;
opacity: 1;
}
60% {
top: 325px;
opacity: 0;
z-index: 0;
}
61% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-moz-keyframes cycle4 {
0% {
top: -325px;
opacity: 0;
}
56% {
top: -325px;
opacity: 0;
}
60% {
top: 0px;
opacity: 1;
}
64% {
top: 0px;
opacity: 1;
}
76% {
top: 0px;
opacity: 1;
z-index: 0;
}
80% {
top: 325px;
opacity: 0;
z-index: 0;
}
81% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-moz-keyframes cycle5 {
0% {
top: -325px;
opacity: 0;
}
76% {
top: -325px;
opacity: 0;
}
80% {
top: 0px;
opacity: 1;
}
84% {
top: 0px;
opacity: 1;
}
96% {
top: 0px;
opacity: 1;
z-index: 0;
}
100% {
top: 325px;
opacity: 0;
z-index: 0;
}
}
#-webkit-keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
16% {
top: 0px;
opacity: 1;
z-index: 0;
}
20% {
top: 325px;
opacity: 0;
z-index: 0;
}
21% {
top: -325px;
opacity: 0;
z-index: -1;
}
50% {
top: -325px;
opacity: 0;
z-index: -1;
}
92% {
top: -325px;
opacity: 0;
z-index: 0;
}
96% {
top: -325px;
opacity: 0;
}
100% {
top: 0px;
opacity: 1;
}
}
#-webkit-keyframes cycle2 {
0% {
top: -325px;
opacity: 0;
}
16% {
top: -325px;
opacity: 0;
}
20% {
top: 0px;
opacity: 1;
}
24% {
top: 0px;
opacity: 1;
}
36% {
top: 0px;
opacity: 1;
z-index: 0;
}
40% {
top: 325px;
opacity: 0;
z-index: 0;
}
41% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-webkit-keyframes cycle3 {
0% {
top: -325px;
opacity: 0;
}
36% {
top: -325px;
opacity: 0;
}
40% {
top: 0px;
opacity: 1;
}
44% {
top: 0px;
opacity: 1;
}
56% {
top: 0px;
opacity: 1;
z-index: 0;
}
60% {
top: 325px;
opacity: 0;
z-index: 0;
}
61% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-webkit-keyframes cycle4 {
0% {
top: -325px;
opacity: 0;
}
56% {
top: -325px;
opacity: 0;
}
60% {
top: 0px;
opacity: 1;
}
64% {
top: 0px;
opacity: 1;
}
76% {
top: 0px;
opacity: 1;
z-index: 0;
}
80% {
top: 325px;
opacity: 0;
z-index: 0;
}
81% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-webkit-keyframes cycle5 {
0% {
top: -325px;
opacity: 0;
}
76% {
top: -325px;
opacity: 0;
}
80% {
top: 0px;
opacity: 1;
}
84% {
top: 0px;
opacity: 1;
}
96% {
top: 0px;
opacity: 1;
z-index: 0;
}
100% {
top: 325px;
opacity: 0;
z-index: 0;
}
}
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">
</script>
<meta charset='utf-8' />
<title>
infinite loop carousel(vertical)
</title>
<style>
</style>
</head>
<body>
<p>review
<span>
<div class="content-slider">
<div class="slider">
<div class="mask">
<ul>
<li class="anim1">
<div class="quote">PDF's</div>
</li>
<li class="anim2">
<div class="quote">Prints</div>
</li>
<li class="anim3">
<div class="quote">Pictures</div>
</li>
<li class="anim4">
<div class="quote">colors</div>
</li>
<li class="anim5">
<div class="quote">testtest</div>
</li>
</ul>
</div>
</div>
</div>
</span></p>
</body>
</html>
Why don't you just position absolute the review text on the left side of the slider ? ( that would be one option )
Also you had some span tags and unclosed tags in your html. Please verify it it first
html,
body {
font-family: 'Droid Serif', serif;
}
.leftText {
position:absolute;
left:0;
}
.slider {
height: 320px;
width: 680px;
margin-left: 50px;
overflow: visible;
position: 0%;
}
.mask {
overflow: hidden;
height: 320px;
}
.slider ul {
margin: 0;
padding: 0;
position: relative;
}
.slider li {
width: 680px;
height: 320px;
position: absolute;
top: -325px;
list-style: none;
}
.slider .quote {
font-size: 40px;
font-style: italic;
}
.slider li.anim1 {
-moz-animation: cycle 15s linear infinite;
-webkit-animation: cycle 15s linear infinite;
animation: cycle 15s linear infinite;
}
.slider li.anim2 {
-moz-animation: cycle2 15s linear infinite;
-webkit-animation: cycle2 15s linear infinite;
animation: cycle2 15s linear infinite;
}
.slider li.anim3 {
-moz-animation: cycle3 15s linear infinite;
-webkit-animation: cycle3 15s linear infinite;
animation: cycle3 15s linear infinite;
}
.slider li.anim4 {
-moz-animation: cycle4 15s linear infinite;
-webkit-animation: cycle4 15s linear infinite;
animation: cycle4 15s linear infinite;
}
.slider li.anim5 {
-moz-animation: cycle5 15s linear infinite;
-webkit-animation: cycle5 15s linear infinite;
animation: cycle5 15s linear infinite;
}
.slider:hover li {
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
#-moz-keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
16% {
top: 0px;
opacity: 1;
z-index: 0;
}
20% {
top: 325px;
opacity: 0;
z-index: 0;
}
21% {
top: -325px;
opacity: 0;
z-index: -1;
}
92% {
top: -325px;
opacity: 0;
z-index: 0;
}
96% {
top: -325px;
opacity: 0;
}
100% {
top: 0px;
opacity: 1;
}
}
#-moz-keyframes cycle2 {
0% {
top: -325px;
opacity: 0;
}
16% {
top: -325px;
opacity: 0;
}
20% {
top: 0px;
opacity: 1;
}
24% {
top: 0px;
opacity: 1;
}
36% {
top: 0px;
opacity: 1;
z-index: 0;
}
40% {
top: 325px;
opacity: 0;
z-index: 0;
}
41% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-moz-keyframes cycle3 {
0% {
top: -325px;
opacity: 0;
}
36% {
top: -325px;
opacity: 0;
}
40% {
top: 0px;
opacity: 1;
}
44% {
top: 0px;
opacity: 1;
}
56% {
top: 0px;
opacity: 1;
}
60% {
top: 325px;
opacity: 0;
z-index: 0;
}
61% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-moz-keyframes cycle4 {
0% {
top: -325px;
opacity: 0;
}
56% {
top: -325px;
opacity: 0;
}
60% {
top: 0px;
opacity: 1;
}
64% {
top: 0px;
opacity: 1;
}
76% {
top: 0px;
opacity: 1;
z-index: 0;
}
80% {
top: 325px;
opacity: 0;
z-index: 0;
}
81% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-moz-keyframes cycle5 {
0% {
top: -325px;
opacity: 0;
}
76% {
top: -325px;
opacity: 0;
}
80% {
top: 0px;
opacity: 1;
}
84% {
top: 0px;
opacity: 1;
}
96% {
top: 0px;
opacity: 1;
z-index: 0;
}
100% {
top: 325px;
opacity: 0;
z-index: 0;
}
}
#-webkit-keyframes cycle {
0% {
top: 0px;
}
4% {
top: 0px;
}
16% {
top: 0px;
opacity: 1;
z-index: 0;
}
20% {
top: 325px;
opacity: 0;
z-index: 0;
}
21% {
top: -325px;
opacity: 0;
z-index: -1;
}
50% {
top: -325px;
opacity: 0;
z-index: -1;
}
92% {
top: -325px;
opacity: 0;
z-index: 0;
}
96% {
top: -325px;
opacity: 0;
}
100% {
top: 0px;
opacity: 1;
}
}
#-webkit-keyframes cycle2 {
0% {
top: -325px;
opacity: 0;
}
16% {
top: -325px;
opacity: 0;
}
20% {
top: 0px;
opacity: 1;
}
24% {
top: 0px;
opacity: 1;
}
36% {
top: 0px;
opacity: 1;
z-index: 0;
}
40% {
top: 325px;
opacity: 0;
z-index: 0;
}
41% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-webkit-keyframes cycle3 {
0% {
top: -325px;
opacity: 0;
}
36% {
top: -325px;
opacity: 0;
}
40% {
top: 0px;
opacity: 1;
}
44% {
top: 0px;
opacity: 1;
}
56% {
top: 0px;
opacity: 1;
z-index: 0;
}
60% {
top: 325px;
opacity: 0;
z-index: 0;
}
61% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-webkit-keyframes cycle4 {
0% {
top: -325px;
opacity: 0;
}
56% {
top: -325px;
opacity: 0;
}
60% {
top: 0px;
opacity: 1;
}
64% {
top: 0px;
opacity: 1;
}
76% {
top: 0px;
opacity: 1;
z-index: 0;
}
80% {
top: 325px;
opacity: 0;
z-index: 0;
}
81% {
top: -325px;
opacity: 0;
z-index: -1;
}
100% {
top: -325px;
opacity: 0;
z-index: -1;
}
}
#-webkit-keyframes cycle5 {
0% {
top: -325px;
opacity: 0;
}
76% {
top: -325px;
opacity: 0;
}
80% {
top: 0px;
opacity: 1;
}
84% {
top: 0px;
opacity: 1;
}
96% {
top: 0px;
opacity: 1;
z-index: 0;
}
100% {
top: 325px;
opacity: 0;
z-index: 0;
}
}
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">
</script>
<meta charset='utf-8' />
<title>
infinite loop carousel(vertical)
</title>
<style>
</style>
</head>
<body>
<p class="leftText">review</p>
<div class="content-slider">
<div class="slider">
<div class="mask">
<ul>
<li class="anim1">
<div class="quote">PDF's</div>
</li>
<li class="anim2">
<div class="quote">Prints</div>
</li>
<li class="anim3">
<div class="quote">Pictures</div>
</li>
<li class="anim4">
<div class="quote">colors</div>
</li>
<li class="anim5">
<div class="quote">testtest</div>
</li>
</ul>
</div>
</div>
</div>
</span></p>
</body>
</html>

CSS animation not working in Internet Explorer, specifically IE9

Here's the code I'm working with. Works fine in Chrome and Firefox, but not IE and can't figure out what I'm doing wrong. Basically an automatic image slider. In IE I'm just getting the first img with no sliding.
Any help would be appreciated.
<style type="text/css">
#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%; }
}
#-webkit-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%; }
}
#-moz-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%; }
}
#-o-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%; }
}
#-ms-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;
-webkit-animation: 30s slidy infinite;
-moz-animation: 30s slidy infinite;
-o-animation: 30s slidy infinite;
-ms-animation: 30s slidy infinite;
}
</style>
<div id="slider">
<figure>
<img alt="" src="#" />
<img alt="" src="#" />
<img alt="" src="#" />
<img alt="" src="#" />
<img alt="" src="http://static.lakana.com/nxsglobal/lasvegasnow/photo/2016/05/24/5mayors300X100-black-border_1464108603276_8689483_ver1.0.jpg" />
</figure>
</div>
As you can see here, CSS Animations are not supported in IE9: http://caniuse.com/#feat=css-animation
Yeah the problem is having to use IE. If it's for a client you can tell them you can't make this work on legacy browsers, maybe display something in place of it (ideally a message to upgrade their browser)

CSS3 Slider Animation Issue [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Here is a link to my Portfolio.
In the bottom half, you'll see the portfolio div and short of the fact that it's not centered, I'm trying to do some CSS3 animations on it to mimic a slider. However, I am having a hell of a time trying to get it to work.
Here is a link to the CodePen.
Short of the colors,the footer not working by sitting at the bottom at all times dont' want to set a height, I need help trying to figure out where I'm going wrong with my transitions from left to right in my slider.
I was following two different tutorials, and trying to dissect them to achieve what I have here. The main reason I am going through route as opposed to using JavaScript is that
I haven't learned it yet
I feel that CSS is going to transform into a very, very powerful tool.
My goal is to make my entire portfolio website JavaScript free.
If someone can take a look and offer suggestions, that'd be fantastic!!!
Here is a FIDDLE that is working as a pure CSS slider that I kludged from HERE.
You can just plug the HTML into your middle div, and add the CSS, and make some adjustments.
Can you explain your problem with the footer a bit more?
The HTML is straight-forward, and here is the CSS:
img {
width: 400px;
height: 300px;
}
#slider {
background: #000;
border: 5px solid #eaeaea;
box-shadow: 1px 1px 5px rgba(0,0,0,0.7);
height: 300px;
width: 400px;
margin: 40px auto 0;
overflow: visible;
position: relative;
}
#mask {
overflow: hidden;
height: 320px;
}
#keyframes cycle {
0% { top: 0px; }
4% { top: 0px; }
16% { top: 0px; opacity:1; z-index:0; }
20% { top: 325px; opacity: 0; z-index: 0; }
21% { top: -325px; opacity: 0; z-index: -1; }
92% { top: -325px; opacity: 0; z-index: 0; }
96% { top: -325px; opacity: 0; }
100%{ top: 0px; opacity: 1; }
}
#keyframes cycletwo {
0% { top: -325px; opacity: 0; }
16% { top: -325px; opacity: 0; }
20% { top: 0px; opacity: 1; }
24% { top: 0px; opacity: 1; }
36% { top: 0px; opacity: 1; z-index: 0; }
40% { top: 325px; opacity: 0; z-index: 0; }
41% { top: -325px; opacity: 0; z-index: -1; }
100%{ top: -325px; opacity: 0; z-index: -1; }
}
#keyframes cyclethree {
0% { top: -325px; opacity: 0; }
36% { top: -325px; opacity: 0; }
40% { top: 0px; opacity: 1; }
44% { top: 0px; opacity: 1; }
56% { top: 0px; opacity: 1; }
60% { top: 325px; opacity: 0; z-index: 0; }
61% { top: -325px; opacity: 0; z-index: -1; }
100%{ top: -325px; opacity: 0; z-index: -1; }
}
#keyframes cyclefour {
0% { top: -325px; opacity: 0; }
56% { top: -325px; opacity: 0; }
60% { top: 0px; opacity: 1; }
64% { top: 0px; opacity: 1; }
76% { top: 0px; opacity: 1; z-index: 0; }
80% { top: 325px; opacity: 0; z-index: 0; }
81% { top: -325px; opacity: 0; z-index: -1; }
100%{ top: -325px; opacity: 0; z-index: -1; }
}
#keyframes cyclefive {
0% { top: -325px; opacity: 0; }
76% { top: -325px; opacity: 0; }
80% { top: 0px; opacity: 1; }
84% { top: 0px; opacity: 1; }
96% { top: 0px; opacity: 1; z-index: 0; }
100%{ top: 325px; opacity: 0; z-index: 0; }
}
#keyframes move {
0% { transform: translateX(0); }
100% { transform: translateX(100px); }
}
#keyframes move {
0% { transform: translateX(0); }
50% { transform: translateX(20px); }
100% { transform: translateX(100px); }
}
#slider ul {
margin: 0;
padding: 0;
position: relative;
}
#slider li {
width: 680px;
height: 320px;
position: absolute;
top: -325px;
list-style: none;
}
#slider li.firstanimation {
animation: cycle 25s linear infinite;
}
#slider li.secondanimation {
animation: cycletwo 25s linear infinite;
}
#slider li.thirdanimation {
animation: cyclethree 25s linear infinite;
}
#slider li.fourthanimation {
animation: cyclefour 25s linear infinite;
}
#slider li.fifthanimation {
animation: cyclefive 25s linear infinite;
}