先上效果 成品就是下面这样
代码如下:
<div class="single-top-html"><!--跑马灯公告-->
<style>
#nr{font-size:18px; 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-background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% 100%; animation: masked-animation 2s infinite linear;} @keyframes masked-animation{0%{background-position: 0 0;} 100%{background-position: -100%, 0;} }
</style>
<div style="background-color:#333;border-radius:3px;box-shadow:0px 0px 5px #f200ff;padding:5px;margin-top:2px;margin-bottom:10px;">
<marquee>
<b id="nr">欢迎访问🐧酷分享(kfx0.com)- 技术教程,破解软件,破解游戏,网上热点,各种文案等,总之就是网络那些事,活动分享QQ群3410925</b> </marquee>
</div>
<!--代码来自kfx0.com-->