What language would make this code simplified so i can easily add more leaves without having to copy paste all the code over and over again. I tried a few less compilers and none of them have worked! I know this is probably super simple but I think I just need another mind to bounce ideas off of because I am stumped! I want almost 100's of leaves to be shot out of the spinning J and want each leaf to have a different path and timing as if the wind is blowing it from the logo!
body html{
overflow: none;
}
.logo{
width: 100vw;
}
.j{
display: block;
margin: 0 auto;
height: 100px;
width: auto;
animation: spin 6s linear infinite;
}
@keyframes spin{
0%{
transform: rotateY(2880deg);
}
80%{
transform: rotateY(360deg);
}
}
.fa{
transform: scale(.5);
}
@keyframes leafanimation {
0% {
transform:translate(0,0) rotate(1440deg);
}
10% {
transform:translate(0,0) rotate(1440deg);
}
40% {
transform:translate(0px,100px) rotate(1080deg); }
60% {
transform:translate(-250px,200px) rotate(720deg); }
80% {
transform:translate(-450px,450px) rotate(360deg); }
100% {
transform:translate(-900px,500px) rotate(0deg);
}
}
.my-logo {
position:absolute;
top:0;
left:50%;
height: 40px;
width: 200px;
line-height: 40px;
font-size: 36px;
color: red;
animation: leafanimation 6s linear infinite;
}
.my-logo div {
display: inline-block;
width: 20px;
height: 40px;
vertical-align: middle;
border-radius: 20px;
}
.my-logo1 {
position:absolute;
top:0;
left:50%;
height: 40px;
width: 50px;
line-height: 40px;
font-size: 36px;
color: green;
animation: leafanimation 6s linear infinite;
animation-delay: .5s;
}
.my-logo1 div {
display: inline-block;
width: 20px;
height: 40px;
vertical-align: middle;
border-radius: 20px;
}
.my-logo2 {
position:absolute;
top:0;
left:50%;
height: 40px;
width: 150px;
line-height: 40px;
font-size: 36px;
color: blue;
animation: leafanimation 6s linear infinite;
animation-delay: .7s;
}
.my-logo2 div {
display: inline-block;
width: 20px;
height: 40px;
vertical-align: middle;
border-radius: 20px;
}
.my-logo3 {
position:absolute;
top:0;
left:50%;
height: 40px;
width: 150px;
line-height: 40px;
font-size: 36px;
color: pink;
animation: leafanimation 6s linear infinite;
animation-delay: .2s;
}
.my-logo3 div {
display: inline-block;
width: 20px;
height: 40px;
vertical-align: middle;
border-radius: 20px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet"/>
<div class="logo"><img class="j" src="https://www.freeiconspng.com/uploads/letter-j-icon-png-24.png"</img></div>
<div class="my-logo">
<div><i class="fa fa-leaf" aria-hidden="true"></i></div>
</div>
<div class="my-logo1">
<div><i class="fa fa-leaf" aria-hidden="true"></i></div>
</div>
<div class="my-logo2">
<div><i class="fa fa-leaf" aria-hidden="true"></i></div>
</div>
<div class="my-logo3">
<div><i class="fa fa-leaf" aria-hidden="true"></i></div>
</div>