@-webkit-keyframes loop{ 0%{background-position: -800px 0;} 100%{background-position: -0 0;} } .text2{ width: 800px; height: 78px; line-height: 78px; font-size: 40px; font-family: ‘微软雅黑‘; font-weight: bold; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-color: red; background-image:url(bg.jpg); background-repeat:no-repeat; background-position: -800px 0; -webkit-animation:loop 10s linear infinite; }
看效果:
犀利的background-clip:text,实现K歌字幕效果
原文:http://www.cnblogs.com/lvdabao/p/background-clip-text.html