<!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>Document</title>
<style>
.box {
height: 200px;
width: 200px;
overflow: hidden;
}
.box1 {
height: 200px;
width: 200px;
overflow: hidden;
animation: change .5s infinite alternate;
}
.box img {
transition: all .5s linear;
}
.box:hover img {
transform: scale(1.2);
}
@keyframes change {
from {}
to {
transform: scale(1.2);
}
}
</style>
</head>
<body>
<div class="box">
<img src="./img/OIP-C.jpg" alt="">
</div>
<div class="box1">
<img src="./img/OIP-C.jpg" alt="">
</div>
</body>
</html>
鼠标移动放大效果
最新推荐文章于 2024-07-16 17:18:30 发布