<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>背景透明渐变</title>
<style type="text/css">
.kuang{height: 40px;
line-height: 40px;
width: 500px;
text-align: center;
color: #3c5190;}
.title {
border-left: 3px solid #3c5190;
background: -webkit-linear-gradient(left,rgba(89,114,192,0.8),rgba(89,114,192,0.2)); /* Safari 5.1 - 6 */
background: -o-linear-gradient(right,rgba(89,114,192,0.8),rgba(89,114,192,0.2)); /* Opera 11.1 - 12*/
background: -moz-linear-gradient(right,rgba(89,114,192,0.8),rgba(89,114,192,0.2)); /* Firefox 3.6 - 15*/
background: linear-gradient(to right, rgba(89,114,192,0.8), rgba(89,114,192,0.2)); /* 标准的语法 */
background-size: 400% 400%;
animation: gradientBG 5s ease infinite;
}
@keyframes gradientBG {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
</head>
<body bgcolor="white">
<div class="kuang">
<div class="title">背景渐变滚动呼吸灯</div>
</div>
</body>
</html>