1、calc函数:
2、过渡
例子
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>过渡exercise</title>
<style>
div {
width: 300px;
height: 300px;
background-color: aqua;
transition: all 0.5s ease;
}
div:hover {
margin-left: 300px;
margin-top: 300px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>