Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS - Beyond the Basics CSS Animation Basics Keyframe Rules and Animation Properties Challenge

Stuck on Task 2! "Next, add a new property that will give our animation a duration of 2 seconds." Please help.

I've tried self.imageView.animationDuration = 2.0; and imageView.animationDuration = 2.0; I can't see to figure it out..

style.css
/* Complete the challenge by writing CSS below */

.prog-bar {
  -webkit-animation: slide 1s ease infinite;}

imageView.animationDuration = 2.0 ;


/*  Keyframes
------------------------------------------ */

@-webkit-keyframes slide {
    0%   { width:   0%; }
    30%, 
    60%  { width:  50%; }
    70%  { width:  80%; }
    100% { width: 100%; }
}
@-moz-keyframes slide {
    0%   { width:   0%; }
    30%, 
    60%  { width:  50%; }
    70%  { width:  80%; }
    100% { width: 100%; }
}
@keyframes slide {
    0%   { width:   0%; }
    30%, 
    60%  { width:  50%; }
    70%  { width:  80%; }
    100% { width: 100%; }
}
index.html
<!DOCTYPE html>
<html>
<head>
    <title>CSS Animations</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="wrap">
        <div class="prog-bar"></div>
    </div>
</body>
</html>

1 Answer

hi cheyanne,

all i did was copy and paste. Then i just changed the second property value to 2s. let me know if your still having trouble.

.prog-bar { -webkit-animation: slide 1s ease infinite;}

.prog-bar { -webkit-animation: slide 2s ease infinite;}