I want to open a door when I click on it and then after animation completion, open the next page
I have tried HTML animation with perspective option. When door opens, it gets too stretched instead of getting opened.
<div class="tile">
<img src="images/door.jpg" />
</div>
div.tile {
margin:20px;
background:red;
-webkit-animation: example 4s ease 0s infinite alternate;
}
@-webkit-keyframes example {
from {
-webkit-transform: perspective(300) rotateY(-90deg);
-webkit-transform-origin: 0% 0%;
}
to {
-webkit-transform: perspective(300) rotateY(0deg);
-webkit-transform-origin: 0% 0%;
}
}
UPDATE Door image size is 522px * 1000 px. I updated the perspective value to 2000 and it looks better now. Please tell me why it worked better on giving so big value and will this work fine if I implement bootstrap to show 4 doors in one row?