用css3实现字体颜色切换变化
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
#test{animation:change 10s linear 0s infinite;font-size:30px;font-weight:700;}
/*@keyframes change{0% {color:#333;}25%{color:#ff0;}50%{color:#f60;}75%{color:#cf0;}100% {color:#f00;}}*/
@keyframes change{ 0%{color:#fff;}
100% {color:#ffec19;}
}
</style>
</head>
<body>
<div id="test">这里是内容</div>
</body>
</html>
学会忘记是生活的技术,学会微笑是生活的艺术