html 代码
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>rollcat</title>
- <style type="text/CSS">
- *{
- margin: 0;padding: 0;
- }
- body{
- background: #333;font-family: "Helvetica Neue",Helvetica,"microsoft yahei",STHeiTi,sans-serif;
- }
- h1{
- width: 100%;height: 80px;line-height: 80px;text-align: center;color: green;margin: 50px auto;font-size: 5em;font-weight: normal;
- background-image: -webkit-linear-gradient(left, #167993, #fbe500 25%, #167993 50%, #fbe500 75%, #167993);
- background-size: 200% 100%;
- -webkit-text-fill-color: transparent;
- -webkit-background-clip: text;
- -webkit-animation: mask 4s infinite linear;
- }
- /****** 不太想做 IE 等浏览器的兼容的分割线 ******/
- @-webkit-keyframes mask {
- 0% { background-position: 0 0;}
- 100% { background-position: -100% 0;}
- }
- p{
- width: 100%;height: 80px;line-height: 80px;text-align: center;color: #999;margin: 50px auto;font-size: 2em;
- background-image: -webkit-linear-gradient(left, #999, #999 5%,#fff 10%, #999 15%, #999);
- background-size: 200%;
- -webkit-text-fill-color: transparent;
- -webkit-background-clip: text;
- -webkit-animation: anim 3s infinite;
- }
- @-webkit-keyframes anim{
- 0%{
- background-position: 0 0;
- }
- 100%{
- background-position: -100% 0;
- }
- }
- </style>
- </head>
- <body>
- <h1 > 风乍起, 吹皱一池春水 </h1>
- <p > 最是那一低头的温柔, 恰似一朵海莲花不胜凉风的娇羞 </p>
- </body>
- </html>
来源: http://www.qdfuns.com/article/15651/82f14718feca4f0aa984ce39511c68ae.html