• 纯css实现


    实现此效果

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 

    <!DOCTYPE html>
    <html lang="en">

    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    .colorful {
    /*-webkit-mask-image: linear-gradient(to right, red, orange, yellow, green, cyan, blue, purple); */
    background-image: linear-gradient(to right, red, orange, yellow, green, yellow, orange, red, orange, yellow, green, yellow, orange, red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-background-size: 200% 100%;
    animation: bgp 5s infinite linear;
    }

    .colorful span {
    color: #E16132;
    margin-right: 5px;
    text-decoration: none;
    padding: 3px 0;
    }

    @-webkit-keyframes bgp {
    0% {
    background-position: 0 0;
    }
    100% {
    background-position: -100% 0;
    }
    }
    </style>
    </head>

    <body>
    <p class="colorful ovh">
    <span>1</span>
    <span>2</span>
    <span>3</span>
    <span>4</span>
    <span>5</span>
    <span>6</span>
    <span>7</span>
    <span>8</span>
    <span>9</span>
    <span>10</span>
    <span>11</span>
    <span>12</span>
    <span>13</span>
    <span>14</span>
    <span>15</span>
    <span>16</span>
    <span>17</span>
    <span>18</span>
    <span>19</span>
    <span>20</span>
    </p>
    </body>

    </html>

     

     

  • 相关阅读:
    java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Date
    权限控制-JS判断是否有权限进行操作跳转页面需要加target
    为你的网站装个“头像”
    本地存储由来的背景
    HTML5的新的结构元素介绍
    Canvas绘图API
    HTML5文件操作API
    认识HTML5
    基于scrapy爬虫的天气数据采集(python)
    Python strip()方法
  • 原文地址:https://www.cnblogs.com/hill-foryou/p/8989942.html
Copyright © 2020-2023  润新知