Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use HTML5 and CSS3 to show off the cool rocket launch animation special effects

Shulou Source: shulou.com Published: 2022-06-01 06:40:00 10月04日 Update

This article mainly explains "how to use HTML5 and CSS3 cool rocket launch animation special effects", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use HTML5 and CSS3 cool rocket launch animation special effects" bar!

HTML structure

CSS style

Body {

Background-color: # 1f2740

Text-align: center

Margin: 20px auto

}

Svg {

Margin: 20px 20px 10px

Width: 300px

}

A {

Color: # f8f3dc

Font-family: monospace

}

# approved {

Clip-path: circle (at center)

Border: 4px solid # f8f3dc

Border-radius: 50%

Animation: rocketShake .1s linear alternate infinite

}

# approved .st0 {

Fill: # 13192d

}

# approved .st1, # approved .st3 {

Fill: # f8f3dc

}

# approved .st3 {

Stroke: # 13192d

Stroke-width: 4

Stroke-miterlimit: 10

}

# approved .st4 {

Fill: # 69b3b2

}

# approved .rocket {

Animation: rocketMove 5s linear alternate infinite

}

# approved .st1 {

Transform: translateY (- 100%)

Animation: starsMove 6s infinite

}

# approved .st1: nth-of-type (5) {

Animation-delay: 3.5s

Animation-duration: 8s

}

# approved .st1: nth-of-type (4) {

Animation-delay: 2s

Animation-duration: 3s

}

# approved .st1: nth-of-type (3) {

Animation-delay: .2s

Animation-duration: 6s

}

# approved .st1: nth-of-type (2) {

Animation-delay: 4s

}

# approved .st4 {

Transform: scale (0)

Opacity: 0

Animation: smoke 2s 1s infinite

Transform-origin: center

Transform-box: fill-box

}

# approved. St4:nth-child (9) {

Animation-delay: .8s

Animation-duration: 1.5s

}

@ keyframes starsMove {

To {

Transform: translateY (100%)

}

}

@ keyframes smoke {

30% {

Transform: scale (2)

Opacity: 1

}

31% {

Opacity: 0.5

}

}

@ keyframes rocketShake {

From {

Transform: rotate (- 0.5deg)

}

To {

Transform: rotate (0.5deg)

}

}

@ keyframes rocketMove {

50% {

Transform: translateY (- 15%)

}

70% {

Transform: translateY (0)

}

80% {

Transform: translateY (2)

}

}

Thank you for your reading, the above is the content of "how to use HTML5 and CSS3 cool rocket launch animation special effects". After the study of this article, I believe you have a deeper understanding of how to use HTML5 and CSS3 cool rocket launch animation special effects, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Animation rockets special effects learning content that is ideas situations articles more styles knowledge knowledge points articles structure follow problems practice push research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Xiaomi NVidia Apple