<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>p228</title>
<style>
div{
width:100px;
height:100px;
background-color:yellow;
transition:width 2s,height 2s,transform 2s;
}
div:hover{
width: 200px;
height: 200px;
transform:rotate(180deg);
}
</style>
</head>
<body>
<div>看看过度效果</div>
</body>
</html>
水平居中,竖直居中