To put the above code into a CSS file, you would need to make a few changes. Here is the updated code:

CSS:

#nr {
  font-size: 30px;
  margin: 10;
  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;
  }
}

HTML:

<div>
  <td height='40' width='821' colspan='2'>
    <span class='STYLE1'>
      <marquee><strong><b id='nr'><a href='https://98tv.github.io'>欢迎来到菲儿福利网。一切福利免费领取</a></b></strong></marquee>
    </span>
  </td>
</div>

Save the above CSS code into a .css file and link it to your HTML file using the <link> tag. Make sure to place the <link> tag within the <head> section of your HTML file.

Example:

<head>
  <link rel='stylesheet' href='styles.css'>
</head>

Note: The above code assumes that you have a valid HTML structure surrounding the provided HTML code.


原文地址: https://www.cveoy.top/t/topic/pKH4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录