<html lang="ja">
<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>アニメーション基礎</title>
<style>
div{
width: 200px;
height: 200px;
background-color: coral;
margin-bottom: 20px;
}
.box1{
transition: 1s;
}
.box1:hover{
transform: translate(100px,100px);
}
.box2{
transition: 0.2s;
width: 200px;
height: 20px;
}
.box2:hover{
transform: rotate(45deg);
}
</style>
</head>
<body>
<div class="box1">1</div>
<div class="box2">2</div>
<div class="box3">3</div>
</body>
</html>