<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transition in css </title>
</head>
<style>
body{
background-color: black;
}
.box{color: white;
border: 2px solid white;
width: 250px;
height: 250px;
align-content: center;
background-color: red;
margin: 15px auto;
}
#box1{display: flex;
text-align: center;
align-content: center;
justify-content: center;
align-items: center;
transition: background-color;
transition-property: all;
transition-duration: 2s;
transition-delay: 2s;
transition-timing-function: ease-in-out;
}
#box1:hover{
background-color:blue ;
border-radius: 15px;
height: 300px;
width: 300px;
font-size: 30px;
}
</style>
<body>
<div class="container">
<div class="box" id="box1">
This is a Box1
</div>
</div>
</body>
</html>
No comments:
Post a Comment