CSS Animation
I realised that my logo and text were static on my landing page and wanted to make this more interesting. I decided that I wanted my logo to move up and down so that it would appear as though it was floating.
Therefore I decided to use a CSS animation.
I researched how I would do this and found a page on W3schools that explained how it would work and then edited this code until I achieved the desired effect.
I used a class instead of an ID as I may want to use this effect elsewhere on my website.
There are two syntax's as one is specifically for safari (uses -webkit) while the other version is the standard syntax. I named the animation logo, as this animation is being used directly on my logo however I may need to rename this if I decide to use this animation elsewhere.
I set the duration for my animation to 3 seconds with a 2 second delay. The timing was set to linear as this created a smooth transition compared to the other timings I tried due to using the same speed from start to end. The count was set to infinate as I want my animation to be playing infinately.
In my code, the @keyframes sets the position of the object at an amount of keyframes. Each percentage is referring to the percentage of keyframes and therefore means that my logo is moving 5 - 10 pixels up and down.
Bibliography
W3SCHOOLS.COM. (2018). w3schools.com. [Source Code] [Online] Available at: https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation4 [Accessed: 16 December 2018]
W3SCHOOLS.COM. (2018). w3schools.com. [Source Code] [Online] Available at: https://www.w3schools.com/css/tryit.asp?filename=trycss3_transition2 [Accessed: 16 December 2018]
W3SCHOOLS.COM. (2018). CSS Animations. [Online] Available at: https://www.w3schools.com/css/css3_animations.asp [Accessed: 16 December 2018]
Therefore I decided to use a CSS animation.
I researched how I would do this and found a page on W3schools that explained how it would work and then edited this code until I achieved the desired effect.
I used a class instead of an ID as I may want to use this effect elsewhere on my website.
There are two syntax's as one is specifically for safari (uses -webkit) while the other version is the standard syntax. I named the animation logo, as this animation is being used directly on my logo however I may need to rename this if I decide to use this animation elsewhere.
I set the duration for my animation to 3 seconds with a 2 second delay. The timing was set to linear as this created a smooth transition compared to the other timings I tried due to using the same speed from start to end. The count was set to infinate as I want my animation to be playing infinately.
In my code, the @keyframes sets the position of the object at an amount of keyframes. Each percentage is referring to the percentage of keyframes and therefore means that my logo is moving 5 - 10 pixels up and down.
Bibliography
W3SCHOOLS.COM. (2018). w3schools.com. [Source Code] [Online] Available at: https://www.w3schools.com/css/tryit.asp?filename=trycss3_animation4 [Accessed: 16 December 2018]
W3SCHOOLS.COM. (2018). w3schools.com. [Source Code] [Online] Available at: https://www.w3schools.com/css/tryit.asp?filename=trycss3_transition2 [Accessed: 16 December 2018]
W3SCHOOLS.COM. (2018). CSS Animations. [Online] Available at: https://www.w3schools.com/css/css3_animations.asp [Accessed: 16 December 2018]
Comments