Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Okay so I am using the code from this webpage... http://codepen.io/Event_Horizon/pen/wBKVQN

This is what I have so far and I can't figure it out. All that's showing is one little particle in the left corner falling. Pls help!

<!DOCTYPE html>
<html>
<head>


<style type="text/css">

html, body {
height: 100%;
}

.conf-cont{
position:relative;
width:100%;
height:100%;
overflow:hidden;
}

.confetti{
position:absolute;
width:12px;
height:12px;
background-color:#f00;
opacity:0.0;


animation-name: fallsway;
animation-duration: 5s;
animation-timing-function: ease-in-out;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: normal;
animation-fill-mode: none;
animation-play-state: running;


@for $i from 1 through 20 {
&:nth-child(#{$i}) {
z-index: $i;
animation-name: fallsway#{$i};
animation-delay: (4 / 20) * $i + s;
background-color:rgb(random(255),random(255),random(255));
}
}
}

@for $i from 1 through 20 {
@keyframes fallsway#{$i} {
0%{
top:-5%;
left:0%+random(95);
opacity:1.0;
transform:skew(-30deg);
}
25%{
left:100%-random(105);
transform:skew(30deg);
}
50%{
left:0%+random(95);
transform:skew(-30deg);
}
75%{
left:100%-random(105);
transform:skew(30deg);
}
100% {
top:100%;
left:0%+random(95);
opacity:1.0;
transform:skew(-30deg);
}
}
}

@keyframes fallsway {
0%{
top:-10%;
left:0%+random(95);
opacity:1.0;
}
25%{
left:0%+random(95);
}
50%{
left:0%+random(95);
}
75%{
left:0%+random(95);
}
100% {
top:110%;
left:0%+random(95);
opacity:1.0;
}
}

</style>
</head>
<body>

(all the div classes are here but it won't show on this website for some reason and the smiley faces showing up are actually one hundred percents)























</body>
</html>

What I have tried:

The code posted is what I have tried.
Posted
Updated 9-Apr-16 1:46am

1 solution

There is a little button called export at the bottom-right corner of demo page
Click that to download whole source
With that way you can get all necessary files instead of copy & paste from demo
 
Share this answer
 
Comments
Member 12446253 9-Apr-16 10:52am    
Thank you so much!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900