<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div {
width: 400px;
height: 400px;
margin: 20px;
position: relative;
}
.box1 {
background-color: green;
transition-duration: 5s, 5s;
border-radius: 50%;
}
.box2 {
background-color: blue;
}
.box1:hover {
border-radius: 0%;
width: 1000px;
height: 1000px;
}
.box1:hover::after {
content: "hahahahah this is me";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
</body>
</html>
<!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>트랜지션으로 적용될 속성을 지정하는 transition-property</title>
<link rel="stylesheet" href="css/_06_transition_property.css" type="text/css">
<style>
div {
width: 100px;
height: 100px;
margin: 20px;
}
.box1 {
background-color: green;
transition-property: width, height;
transition-duration: 3s, 7s;
}
.box2 {
background-color: blue;
transition-property: border-radius;
transition-duration: 3s;
}
.box1:hover {
width: 200px;
height: 150px;
}
.box2:hover {
border-radius: 50%;
}
</style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
</body>
</html>
댓글 영역