![]() |
New Perspectives on HTML5 and CSS3, 8th Edition Tutorial 4 |
This demo display how to work with backfaces in three dimension. To create a two-sided object, the objects must be placed at the same location. The object representing the backface must be rotated 180° around the y-axis.
After the two objects have been positioned, you can use the backface-visibility
property to set whether the backface shows through or not. If backface-visibility
is set to hidden
the backface does not show through. If backface-visibility
is set to visible
, the backface will show through into the front face.
Click the [Insert Front Object] and [Insert Back Object] buttons to animate the process of adding the front and back objects to the demo. Use the sliders to rotate the object horizontal and vertical axes. Click the Display Backfaces checkboxes to toggle between displaying and hiding the backface. The CSS code for your choices appears below.
This card displays a sketch for the painting Battle of Cascina by Michelangelo, in which Florentine soldiers bathing in a river are taken by surprise by the Pisan army. This prepatory sketch of part of the final painting depicts a soldier emerging naked from the river to face the attacking Pisans.
The final painting was destroyed shortly after its completion, so prepatory sketches are all that remain of Michelangelo's vision.