码迷,mamicode.com
首页 > Web开发 > 详细

纯css实现

时间:2018-05-04 14:22:30      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:span   type   title   nbsp   round   inf   add   ati   实现   

实现此效果

 

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>

 

 

 

纯css实现

标签:span   type   title   nbsp   round   inf   add   ati   实现   

原文地址:https://www.cnblogs.com/hill-foryou/p/8989942.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!