实现鼠标移上缩小字间距-trasition
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>过渡</title>
<style>
body{
background-color: #00CCFF;
}
p{
text-align: center;
letter-spacing: 50px;
font-size: 50px;
color: rgba(255,255,255,0.5);
transition: all 5s ease;
}
p:hover{
text-align: center;
font-size: 50px;
letter-spacing: 0;
color: white;
}
</style>
</head>
<body>
<p>4亿网友共同信赖</p>
</body>
</html>