Imitation webpage: nec homepage animation effect
Nec link:
First, we will introduce animation.
Animation retrieves or sets the animation effects applied to an object.
Animation is implemented by the "keyframes" attribute.
Keyframes has its own syntax rules. Its name starts with "@ keyframes", followed by the "animation name" and a pair of curly braces "{}". there are some style rules in the brackets for different time periods, a bit like the style of css.
Introduction to the animation attributes:
Animation-name: Retrieves or sets the animation name applied to an object.
Animation-duration: Retrieves or sets the duration of an object animation.
Animation-timing-function: Retrieves or sets the transition type of an object animation.
Animation-delay: Retrieves or sets the animation delay time of an object.
Animation-iteration-count: Retrieves or sets the number of cycles of an object animation.
Animation-direction: Retrieves or sets the reverse motion of an object animation in a loop.
Animation-play-state: Retrieves or sets the state of an object animation. W3c is considering whether to remove this attribute because the animation state can be implemented in other ways, such as resetting the style.
Nec animation implementation principle:
Three-layer background layer, bubble layer, and text hollow-out layer are used. The bubble layer achieves the motion effect through the animation attribute.
Html structure:
Css style:
{:;:;:;:;}{:;:;:;:;:;:;}{:;:;}{:;}{:;:;}{:;:;:;:;:;:;:;:;:;:;:;}{:;:;:;:;:;:;}{:;:;:;:;:;:;}{:;:;:;:;:;:;}{:;:;:;:;:;:;}{:;:;:;:;:;:;}{:;}{:;}{:;}{:;}{:;}{:;}{:;}{:;}
Nec animation effect:
Run code