Transform Property In CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Transform</title>
<style>
* {
margin: 0px;
padding: 0px;
}
.container {
height: 80vh;
background-color: rgb(44, 19, 92);
display: flex;
justify-content: center;
align-items: center;
}
.box {
display: flex;
justify-content: center;
align-items: center;
background: rgb(97, 90, 90);
border: 2px solid black;
border-radius: 8px;
height: 250px;
width: 250px;
/* transform: rotate(45deg); */
transition: all .3s ease-in-out;
}
.box:hover{
/* transform: rotate(360deg); */
/* transform: skew(40deg); */
/* transform: scale(1.2); */
transform: translateX(123px);
transform: translateY(123px);
transform: translate(123px, 123px);
}
</style>
</head>
<body>
<div class="container">
<div class="box">This is box</div>
</div>
</body>
</html>
Comments
Post a Comment