scale(x,y)
一个值的时候 xy都缩放
两个值的时候 分别 x 和 y
举例
<!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>
.wrap{
width: 500px;
height: 500px;
background: pink;
margin: 50px auto;
border: 1px solid #333;
/* padding-top: 1px; */
}
.box{
width: 100px;
height: 100px;
background: yellow;
margin: 150px auto;
transition: 1s;
}
.wrap:hover .box{
transform: scale(2);
transform: scale(2,3);
transform: scaleX(2);
transform: scaleX(2);
transform: scale(.5);
}
</style>
</head>
<body>
<div class="wrap">
<div class="box"></div>
</div>
</body>
</html>