html纯CSS样式实现文字的跑马灯(流光)特效
HTML代码
<div>
<p>
于飞SEO
</p>
</div>
CSS代码
<style type="text/css">
body {
margin: 0;
padding: 0;
background-color: #2f2424;
}
div {
margin: 400px auto;
font-size: 40px;
text-align: center;
}
p {
margin: 0;
background: -webkit-linear-gradient(left,
#ffffff,
#ff0000 6.25%,
#ff7d00 12.5%,
#ffff00 18.75%,
#00ff00 25%,
#00ffff 31.25%,
#0000ff 37.5%,
#ff00ff 43.75%,
#ffff00 50%,
#ff0000 56.25%,
#ff7d00 62.5%,
#ffff00 68.75%,
#00ff00 75%,
#00ffff 81.25%,
#0000ff 87.5%,
#ff00ff 93.75%,
#ffff00 100%);
-webkit-backgr