css过渡效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div{
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
background-color: pink;
/*transition: width 8s ease 0s,height 8s,border-radius 8s; */ /*属性 持继多长时间 曲线 何时开始,多组属性用豆号分隔*/
transition: all 8s; /*all 表示所有属性,后面两个属性可以省略*/
}
div:hover{
width: 200px;
height: 200px;
font-size:30px;
line-height: 200px;
border-radius: 50%;
color:red;
</style>
</head>
<body>
<div>零度雨</div>
</body>
</html>
2、
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
margin:0;
padding:0;
}
li{
list-style: none;
float: left;
margin:0 5px;
width: 173px;
height: 130px;
/*border:1px solid red;*/
overflow: hidden;
}
li img{
width:183px;
height: 130px;
transition: all 1s;
}
img:hover{
margin-left: -10px;
}
</style>
</head>
<body>
<div>
<ul>
<li><a href="#"><img src="images/1.jpg" alt=""></a></li>
<li><a href="#"><img src="images/2.jpg" alt=""></a></li>
<li><a href="#"><img src="images/3.jpg" alt=""></a></li>
</ul>
</div>
</body>
</html>