The Book of CSS3 - A Developer\'s Guide to the Future of Web Design (2nd edition)

(C. Jardin) #1

13


3D Tr ansformaTions


All of the features and functions I’ve dis-
cussed in this book so far have involved two
dimensions; every element has height and
width, and all of the calculations have involved

only the x-axis and y-axis. But with the introduction


of the z-axis in the CSS Transforms Module, CSS3 offers a revolutionary
way to transform an element in the third dimension (you can learn more
at http://www.w3.org/TR/css-transforms-1/)..)
At the time I wrote the first edition of this book, only Safari (for Mac
and iOS) supported 3D transformations, but now just a few years later, stable
implementations are in place across all major browsers, including IE10 and
above—an incredibly rapid rate of adoption. At the time of this writing, in
Safari, you need to apply the -webkit- prefix to all properties, but no other
browsers have a requirement for a vendor prefix.
The work of moving objects around in three dimensions can be quite
processor-intensive, but most (if not all) browsers have implemented what’s
known as hardware acceleration, performing the required calculations directly
on the device’s graphics chip rather than in the software of the browser


PX

3024
Free download pdf