Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the rotation of picture space by Css3

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

This article mainly introduces Css3 how to achieve picture space rotation related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this Css3 how to achieve picture space rotation article will have a harvest, let's take a look at it.

Transform-style: attributes specify how nested elements are rendered in 3D space.

Animation: used to set six animation properties {

Animation-name specifies the name of the keyframe that needs to be bound to the selector.

Animation-duration specifies the time it takes to complete the animation, in seconds or milliseconds.

Animation-timing-function specifies the speed curve of the animation.

Animation-delay specifies the delay before the animation starts.

Animation-iteration-count specifies how many times the animation should be played.

Animation-direction specifies whether the animation should be played in reverse in turn.

}

Html Code:

MDN

HTML5

X axis

Y axis

Z axis

Css code

# logos

{

Position: relative

Margin: 0 auto

-webkit-perspective: 822px

Perspective: 822px

}

# cube

{

Display: block

Position: relative

Margin: 30px auto

Height: 200px

Width: 200px

-webkit-transform-style: preserve-3d

-webkit-transform: rotateX (- 5deg) translateX (8px)

Transform-style: preserve-3d

Transform: rotateX (- 5deg) translateX (8px)

}

# front

{

Position: absolute

Height: 200px

Width: 200px

-webkit-backface-visibility: visible

-webkit-transform: translateZ (100px)

Backface-visibility: visible

Transform: translateZ (100px)

}

# back

{

Position: absolute

Height: 200px

Width: 200px

-webkit-backface-visibility: visible

Backface-visibility: visible

-webkit-transform: rotateY (180deg) translateZ (100px)

Transform: rotateY (180deg) translateZ (100px)

}

# cube

{

-webkit-animation: rotateGif 5s infinite linear

Animation: rotateGif 5s infinite linear

}

@-webkit-keyframes rotateGif

{

0%

{

-webkit-transform: rotateY (0)

}

100%

{

-webkit-transform: rotateY (360deg)

}

}

@ keyframes rotateGif

{

0%

{

Transform: rotateY (0)

}

100%

{

Transform: rotateY (360deg)

}

}

# xaxis

{

-moz-transform-style: preserve-3d

-moz-transform: translate3d (- 100pxPower0Pol 0)

-webkit-transform-style: preserve-3d

-webkit-transform: translate3d (- 100pxPower0Pol 0)

-ms-transform-style: preserve-3d

-ms-transform: translate3d (- 100pxPower0Pol 0)

-o-transform-style: preserve-3d

-o-transform: translate3d (- 100pxPower0Pol 0)

Transform-style: preserve-3d

Transform: translate3d (- 100pxjin0pxre0pc0pl 0)

Border-bottom: black 1px solid

Color: blue

Width: 400px

Display: block

Position: absolute

Top: 100px

Height: 1px

}

# yaxis

{

-moz-transform-style: preserve-3d

-moz-transform: rotateZ (- 90deg) translate3d (0memmerly100pxmem0)

-webkit-transform-style: preserve-3d

-webkit-transform: rotateZ (- 90deg) translate3d (0memmerly100pxmem0)

-ms-transform-style: preserve-3d

-ms-transform: rotateZ (- 90deg) translate3d (0memmerly100pxmem0)

-o-transform-style: preserve-3d

-o-transform: rotateZ (- 90deg) translate3d (0memmerly100pxmem0)

Transform-style: preserve-3d

Transform: rotateZ (- 90deg) translate3d (0memery 100pxmem0)

Border-bottom: green 1px solid

Color: green

Width: 400px

Display: block

Position: absolute

Top: 100px

Height: 1px

}

# zaxis

{

-moz-transform-style: preserve-3d

-moz-transform: rotateY (90deg) translate3d (0meme 0mai Murray 100px)

-ms-transform-style: preserve-3d

-ms-transform: rotateY (90deg) translate3d (0meme 0mai Murray 100px)

-webkit-transform-style: preserve-3d

-webkit-transform: rotateY (90deg) translate3d (0meme 0mai Murray 100px)

-o-transform-style: preserve-3d

-o-transform: rotateY (90deg) translate3d (0meme 0mai Murray 100px)

Transform-style: preserve-3d

Transform: rotateY (90deg) translate3d (0meme 0mam muri 100px)

Border-bottom: red 1px solid

Color: red

Width: 400px

Display: block

Position: absolute

Top: 100px

Height: 1px

}

This is the end of the article on "how to rotate the picture space in Css3". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to achieve picture space rotation in Css3". If you want to learn more knowledge, you are welcome to follow the industry information channel.

Tags: Animation space pictures knowledge code content attributes articles values elements names easy to operate articles time easy to understand curves more times look industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn OPPO Reno Huawei Apple