Vous êtes sur la page 1sur 2

7/21/2014 CSS3 3D Transforms

http://www.w3schools.com/css/css3_3dtransforms.asp 1/2
REFERENCES | EXAMPLES | FORUM
CSS Tutorial
CSS HOME
CSS Introduction
CSS Syntax
CSS Selectors
CSS How To
CSS Backgrounds
CSS Text
CSS Fonts
CSS Links
CSS Lists
CSS Tables
CSS Box Model
CSS Border
CSS Outline
CSS Margin
CSS Padding
CSS Dimension
CSS Display
CSS Positioning
CSS Floating
CSS Align
CSS Combinators
CSS Pseudo-class
CSS Pseudo-element
CSS Navigation Bar
CSS Image Gallery
CSS Image Opacity
CSS Image Sprites
CSS Media Types
CSS Attr Selectors
CSS3 Tutorial
CSS3 Introduction
CSS3 Borders
CSS3 Backgrounds
CSS3 Gradients
CSS3 Text Effects
CSS3 Fonts
CSS3 2D Transforms
CSS3 3D Transforms
CSS3 Transitions
CSS3 Animations
CSS3 Multiple Columns
CSS3 User Interface
CSS Summary
CSS Examples
CSS Examples
CSS Quiz
CSS Certificate
CSS References
CSS Reference
CSS Selectors
CSS Reference Aural
CSS Web Safe Fonts
CSS Units
CSS Colors
CSS Color Values
CSS Color Names
CSS Color HEX
Previous Next Chapter
CSS3 3D Transforms
CSS3 3D Transforms
CSS3 allows you to format your elements using 3D transforms.
In this chapter you will learn about some of the 3D transform methods:
rotateX()
rotateY()
Click on the elements below, to see the difference between a 2D transform and a 3D transform:
Browser Support for 3D Transforms
The numbers in the table specifies the first browser version that fully supports the property.
Numbers followed by -webkit-, -moz-, or -o- specifies the first version that worked with a prefix.
Property
transform 10.0 12.0 -webkit- 16.0
10.0 -moz-
4.0 -webkit- 15.0 -webkit-
transform-origin
(three-value syntax)
10.0 12.0 -webkit- 16.0
10.0 -moz-
4.0 -webkit- 15.0 -webkit-
transform-style Not supported 12.0 -webkit- 16.0
10.0 -moz-
4.0 -webkit- 15.0 -webkit-
perspective 10.0 12.0 -webkit- 16.0
10.0 -moz-
4.0 -webkit- 15.0 -webkit-
perspective-origin 10.0 12.0 -webkit- 16.0
10.0 -moz-
4.0 -webkit- 15.0 -webkit-
backface-visibility 10.0 12.0 -webkit- 16.0
10.0 -moz-
4.0 -webkit- 15.0 -webkit-
The rotateX() Method
With the rotateX() method, the element rotates around its X-axis at a given degree.
Example
div {
-webkit-transform: rotateX(120deg); /* Chrome, Safari, Opera */
transform: rotateX(120deg);
}
Try it yourself
The rotateY() Method
With the rotateY() method, the element rotates around its Y-axis at a given degree.
Search w3schools.com:
WEB HOSTING
WEB BUILDING
W3SCHOOLS EXAMS
HTML, CSS, JavaScript,
PHP, jQuery, XML, and
ASP Certifications
SHARE THIS PAGE
WEB RESOURCES
Web Statistics
Web Validation
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
2D
rotate
3D
rotate
Select Language
7/21/2014 CSS3 3D Transforms
http://www.w3schools.com/css/css3_3dtransforms.asp 2/2
Previous Next Chapter
Example
div {
-webkit-transform: rotateY(130deg); /* Chrome, Safari, Opera */
transform: rotateY(130deg);
}
Try it yourself
CSS3 Transform Properties
The following table lists all the transform properties:
Property Description
transform Applies a 2D or 3D transformation to an element
transform-origin Allows you to change the position on transformed elements
transform-style Specifies how nested elements are rendered in 3D space
perspective Specifies the perspective on how 3D elements are viewed
perspective-origin Specifies the bottom position of 3D elements
backface-visibility Defines whether or not an element should be visible when not facing the screen
3D Transform Methods
Function Description
matrix3d
(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n)
Defines a 3D transformation, using a 4x4 matrix of 16 values
translate3d(x,y,z) Defines a 3D translation
translateX(x) Defines a 3D translation, using only the value for the X-axis
translateY(y) Defines a 3D translation, using only the value for the Y-axis
translateZ(z) Defines a 3D translation, using only the value for the Z-axis
scale3d(x,y,z) Defines a 3D scale transformation
scaleX(x) Defines a 3D scale transformation by giving a value for the X-axis
scaleY(y) Defines a 3D scale transformation by giving a value for the Y-axis
scaleZ(z) Defines a 3D scale transformation by giving a value for the Z-axis
rotate3d(x,y,z,angle) Defines a 3D rotation
rotateX(angle) Defines a 3D rotation along the X-axis
rotateY(angle) Defines a 3D rotation along the Y-axis
rotateZ(angle) Defines a 3D rotation along the Z-axis
perspective(n) Defines a perspective view for a 3D transformed element
REPORT ERROR | HOME | TOP | PRINT | FORUM | ABOUT | ADVERTISE WITH US
Top 10 Tutorials
HTML Tutorial
HTML5 Tutorial
CSS Tutorial
CSS3 Tutorial
JavaScript Tutorial
jQuery Tutorial
SQL Tutorial
PHP Tutorial
ASP.NET Tutorial
XML Tutorial
Top 10 References
HTML/HTML5 Reference
CSS 1,2,3 Reference
CSS 3 Browser Support
JavaScript
HTML DOM
XML DOM
PHP Reference
jQuery Reference
ASP.NET Reference
HTML Colors
Top 10 Examples
HTML Examples
CSS Examples
JavaScript Examples
HTML DOM Examples
PHP Examples
jQuery Examples
XML Examples
XML DOM Examples
ASP Examples
SVG Examples
Web Certificates
HTML Certificate
HTML5 Certificate
CSS Certificate
JavaScript Certificate
jQuery Certificate
PHP Certificate
XML Certificate
ASP Certificate
Color Picker
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples
are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use,
cookie and privacy policy. Copyright 1999-2014 by Refsnes Data. All Rights Reserved.

Vous aimerez peut-être aussi