Transition Property in CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Transitions</title>
<style>
.container{
background-color: antiquewhite;
width: 50vw;
height: 40vh;
}
.box{
background-color: aquamarine;
width: 5vw;
height: 4vh;
/* transition-property: background-color, transform;
transition-duration: 3s;
transition-timing-function: cubic-bezier(0.22, 0.43, 0, 0.99); */
/* transition-delay: 1s; */
transition: all 3s cubic-bezier(0.09, 0.5, 0, 0.99) 1s;
}
.translate{
transform: translateX(10vw) translateY(10vh) scale(2);
background-color: blue;
}
</style>
</head>
<body>
<div class="container">
<div class="box translate"></div>
</div>
</body>
</html>
Comments
Post a Comment