:active (Final)
by Sasabee
HTML
<div></div>
CSS
body {
display: flex;
justify-content: center;
align-items: center;
background-color: #000;
height: 100vh;
}
div {
cursor: pointer;
background-color: #f00;
width: 300px;
height: 100px;
font-size: 24px;
font-weight: bold;
color: #000;
display: flex;
justify-content: center;
align-items: center;
transform: rotateY(0);
transition: 1s transform;
}
div:active {
transform: rotateY(360deg);
transition: none;
}
div::before {
content: "BUTTON";
}