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

css各种练习

时间:2017-10-22 22:21:51      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:class   lan   inf   die   har   asc   col   isp   css   

2017年10月22日

技术分享

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	 <style>
	 	.masked h4{
		  display: block;
		  width:600px;
		  height:200px;
		  background-image: -webkit-linear-gradient(left, #3498db, #f47920 10%, #d71345 20%, #f7acbc 30%, #ffd400 40%, #3498db 50%, #f47920 60%, #d71345 70%, #f7acbc 80%, #ffd400 90%, #3498db);
		  color: transparent;
		  -webkit-text-fill-color:transparent;
		  -webkit-background-clip:text;
		  background-size:200% 100%;
		  -webkit-background-size:200% 100%;
		  -webkit-animation:masked-animation 4s infinite linear;
		}
		@-webkit-keyframes masked-animation{
		    0%{
		      background-position: 0 0;   
		    }
		    100%{
		      background-position: -100% 0;  
		    }
		  }

		 
	 </style>
</head>
<body>
	<div class="masked">
	    <h4>这是一段可选文字这是一段可选文字这是一段可选文字这是一段可选文字</h4>
	</div>
</body>
</html>

  

css各种练习

标签:class   lan   inf   die   har   asc   col   isp   css   

原文地址:http://www.cnblogs.com/coding4/p/7710473.html

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