Home  >  Article  >  Web Front-end  >  CSS3 Tutorial-3D Conversion

CSS3 Tutorial-3D Conversion

黄舟
黄舟Original
2016-12-27 15:59:521626browse

Hello! The previous article introduced you to the CSS3 tutorial-2D conversion. I wonder how you learned it? Next, I will introduce to you the CSS3 tutorial-3D conversion.

3D Transforms:

CSS3 allows you to use 3D transforms to format elements.

In this article, you will learn two 3D transformation methods:

rotateX();

rotateY().

How does it work?

Transformation is an effect that causes an element to change its shape, size, and position.

You can transform your elements using 2D or 3D transformations.

Browser support:

CSS3 Tutorial-3D Conversion

Internet Explorer 10 and Firefox support 3D conversion.

Chrome and Safari require the prefix -webkit-.

Opera still does not support 3D conversion (it only supports 2D conversion).

rotateX() method:

CSS3 Tutorial-3D Conversion

#With the rotateX() method, an element is rotated by a given degree around its X-axis.

Instance:

div
{
transform: rotateX(120deg);
-webkit-transform: rotateX(120deg); /* Safari and Chrome */
}

rotateY() method:

CSS3 Tutorial-3D Conversion

rotateY() method, rotate around its Y-axis at a given degree Elements.

Example:

div
{
transform: rotateY(130deg);
-webkit-transform: rotateY(130deg); /* Safari and Chrome */
}

Conversion attributes:

The following table lists all conversion attributes:

CSS3 Tutorial-3D Conversion

3D conversion method:

CSS3 Tutorial-3D Conversion

The above is the content of CSS3 tutorial-3D conversion. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:CSS3 Tutorial-BackgroundNext article:CSS3 Tutorial-Background