A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3resource.com/html-css-exercise/css-properties/backface-visibility-answer.php below:

Website Navigation


CSS Properties: How to visible or hide the backside of a rotated division element?

CSS Properties: How to visible or hide the backside of a rotated division element?Last update on February 15 2024 10:04:22 (UTC/GMT +8 hours)

Go to Exercise page

Solution:

HTML Code:

<!DOCTYPE html>
<html>
<head>
<title>How to visible or hide the backside of a rotated division element</title><!-- Set the title of the HTML document -->
<style> /* CSS style start*/
xyz {
position: relative; /* Set the position of the elements to relative */
height: 100px; /* Set the height of the elements to 100px */
width: 100px; /* Set the width of the elements to 100px */
background-color: #CC00CC; /* Set the background color of the elements */
-webkit-transform: rotateY(180deg);  /* Chrome, Safari, Opera */ /* Apply a 180-degree rotation around the Y-axis for WebKit browsers */
transform: rotateY(180deg); /* Apply a 180-degree rotation around the Y-axis */
}
#xyz1 {
-webkit-backface-visibility: visible;  /* Chrome, Safari, Opera */ /* Make the back side of the element visible for WebKit browsers */
backface-visibility: visible; /* Make the back side of the element visible */
}
#xyz2 {
-webkit-backface-visibility: hidden;  /* Chrome, Safari, Opera */ /* Hide the back side of the element for WebKit browsers */
backface-visibility: hidden; /* Hide the back side of the element */
}
</style>
</head>
<body>
<div id="xyz1">w3resource Tutorial</div><!-- Create a division element with id "xyz1" and content "w3resource Tutorial" -->
<div id="xyz2">w3resource Tutorial</div><!-- Create a division element with id "xyz2" and content "w3resource Tutorial" -->
</body>
</html>

Explanation:

Live Demo:

See the Pen backface-visibility-answer by w3resource (@w3resource) on CodePen.

See the solution in the browser

Supported browser

Go to Exercise page

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4