Explore the World of HTML and CSS
<div id="section1">
<div id="box1">WELCOME</div>
</div>
<div id="section2">
<div id="box2">WELCOME</div>
</div>
CSS Styles for Transformation
#section1
{
position: relative;
height: 150px;
width: 150px;
margin: 50px;
padding:10px;
border: 1px solid black;
-webkit-perspective:150px; /* Chrome, Safari, Opera */
perspective:150px;
}
#box1
{
padding:50px;
position: absolute;
border: 1px solid black;
background-color: red;
-webkit-transform-origin:0%; /* Chrome, Safari, Opera */
-webkit-transform: rotateY(117deg); /* Chrome, Safari, Opera */
transform: rotateX(-75deg);
}
#section2
{
position: relative;
height: 150px;
width: 150px;
margin: 50px;
padding:10px;
border: 1px solid black;
-webkit-perspective:150px; /* Chrome, Safari, Opera */
perspective:150px;
}
#box2
{
padding:50px;
position: absolute;
border: 1px solid black;
background-color: red;
-webkit-transform-origin:0%; /* Chrome, Safari, Opera */
-webkit-transform: rotateY(0deg); /* Chrome, Safari, Opera */
transform: rotateX(-75deg);
}
Experimenting with Rotate Transformations
Source code reference: Link. But facing issues in implementation. How to rectify?
-webkit-backface-visibility: visible;
-webkit-transform-origin: 0% 50%;
-webkit-transform: perspective(800px) rotateY(90deg) rotateY(-90deg);