Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use CSS3 to realize the special effects of science and technology sphere rotation animation

2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use CSS3 to achieve the technology sphere rotation animation special effects", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use CSS3 technology sphere rotation animation special effects" this article.

Position: absolute

Left: 0

Right: 0

Bottom: 0

Top: 0

Margin: auto

Box-sizing: border-box

Border-radius: inherit

Border: 1px solid

Box-shadow: inset 0 0 2em, 0 0 2em

}

.side:: before {

Width: 2.5em

Height: 2.5em

Color: gold

}

.side:: after {

Width: 1.5em

Height: 1.5em

-webkit-transform: translateZ (- 2em)

Transform: translateZ (- 2em)

Box-shadow: inset 0 0 1em, 0 0 1em

Color: teal

}

Side-- back {

-webkit-transform: translateZ (- 5em) rotateY (180deg)

Transform: translateZ (- 5em) rotateY (180deg)

}

Side-- left {

-webkit-transform: translateX (- 5em) rotateY (- 90deg)

Transform: translateX (- 5em) rotateY (- 90deg)

}

Side-- right {

-webkit-transform: translateX (5em) rotateY (90deg)

Transform: translateX (5em) rotateY (90deg)

}

Side-- top {

-webkit-transform: translateY (- 5em) rotateX (90deg)

Transform: translateY (- 5em) rotateX (90deg)

}

Side-- bottom {

-webkit-transform: translateY (5em) rotateX (- 90deg)

Transform: translateY (5em) rotateX (- 90deg)

}

Side-- front {

-webkit-transform: translateZ (5em)

Transform: translateZ (5em)

}

.side _ _ inner {

Position: absolute

Left: 0

Right: 0

Bottom: 0

Top: 0

Width: 5em

Height: 5em

Margin: auto

Border-radius: inherit

Border: 1px solid

Box-shadow: inset 0 0 2em

Color: orangered

-webkit-transform: translateZ (2em)

Transform: translateZ (2em)

-webkit-transform-style: preserve-3d

Transform-style: preserve-3d

}

.side _ _ inner::before, .side _ _ inner::after {

Content: ""

Display: block

Position: absolute

Left: 0

Right: 0

Bottom: 0

Top: 0

Margin: auto

Box-sizing: border-box

Border-radius: inherit

Border: 1px solid

Box-shadow: inset 0 0 2em, 0 0 2em

}

.side _ _ inner::before {

Width: 2.5em

Height: 2.5em

-webkit-transform: translateZ (2em)

Transform: translateZ (2em)

Color: crimson

}

.side _ _ inner::after {

Width: 1.5em

Height: 1.5em

-webkit-transform: translateZ (4em)

Transform: translateZ (4em)

Color: purple

}

@-webkit-keyframes rotate {

100% {

-webkit-transform: rotateX (360deg) rotateY (720deg) rotateZ (360deg)

Transform: rotateX (360deg) rotateY (720deg) rotateZ (360deg)

}

}

@ keyframes rotate {

100% {

-webkit-transform: rotateX (360deg) rotateY (720deg) rotateZ (360deg)

Transform: rotateX (360deg) rotateY (720deg) rotateZ (360deg)

}

}

HTML, BODY {

Height: 100%

}

BODY {

Display:-webkit-box

Display:-ms-flexbox

Display: flex

-webkit-box-pack: center

-ms-flex-pack: center

Justify-content: center

-webkit-box-align: center

-ms-flex-align: center

Align-items: center

}

The above is all the contents of this article entitled "how to use CSS3 to achieve the special effects of technology sphere rotation animation". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 223

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report