代码参考时间过渡制作

<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
padding:0;
margin:0;
}
div{
width: 500px;
height: 500px;
border:1px solid red; 
}
p{
width: 50px;
height: 50px;
background:blue;
margin-left:5px;
}
div:hover p{
margin-left:300px;
transition:all 3s;
/*transition 时间过渡
transition:需要时间过渡的属性/all  过渡时间长短;*/
}
</style>
</head>
<body>
<div>
<p></p>
</div>
</body>
</html>

相关文章:

  • 2021-12-30
  • 2021-12-10
  • 2021-09-01
  • 2022-12-23
  • 2021-06-29
  • 2021-12-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2021-04-08
  • 2022-01-19
  • 2022-12-23
相关资源
相似解决方案