I am trying to make it so when the page loads circles appear which is fine, but I need them to grow outwards, so small to big from the center not from the top left:
You can see what I have currently here: http://thomasbritton.co.uk/projects/ebrd/
Ideally, want this to be done in CSS but can use JS if it's easier/more stable.
Any ideas?
Here is my css also for the animation part:
.circle a {
border-radius: 150px;
color: #fff;
height: 0;
position: absolute;
text-decoration: none;
width: 0;
}
.circle a.grow {
-webkit-animation-name: grow;
-webkit-animation-duration: 2.2s;
-webkit-animation-timing-function: ease;
-webkit-animation-iteration-count: 1;
-webkit-animation-direction: normal;
-webkit-animation-delay: 0;
-webkit-animation-play-state: running;
-webkit-animation-fill-mode: forwards;
-moz-animation-name: grow;
-moz-animation-duration: 2.2s;
-moz-animation-timing-function: ease;
-moz-animation-iteration-count: 1;
-moz-animation-direction: normal;
-moz-animation-delay: 0;
-moz-animation-play-state: running;
-moz-animation-fill-mode: forwards;
animation-name: grow;
animation-duration: 2.2s;
animation-timing-function: ease;
animation-iteration-count: 1;
animation-direction: normal;
animation-delay: 0;
animation-play-state: running;
animation-fill-mode: forwards;
}
@-webkit-keyframes grow {
0% { -moz-transform: scale(0); }
100% { -moz-transform: scale(1); }
}
@-moz-keyframes grow {
0% { -moz-transform: scale(0); }
100% { -moz-transform: scale(1); height: 168px; width: 168px; }
}
@keyframes grow {
0% { -moz-transform: scale(0); }
100% { -moz-transform: scale(1); }
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…