您现在的位置是:首页 > 前端 > css网站首页css

CSS3文字 - 高光水波渐变特效

  • 袁志蒙
  • 2016-08-25 22:51:28
  • 3879 次阅读
最近在开发我的YZMPHP框架,在繁忙中也做了一些css3的小效果,在这里展示一下。源码...

最近在开发我的YZMPHP框架,在繁忙中也做了一些css3的小效果,在这里展示一下。

文字效果:

CSS3文字 - 高光水波渐变特效


源码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>YZMPHP - 轻量级PHP框架</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, #147B96, #E6D205 25%, #147B96 50%, #E6D205 75%, #147B96);
	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>YZMPHP 轻量级PHP框架</h1>

<p>YZMPHP 念念不忘,必有回响,有一口气,点一盏灯</p>

</body>
</html>
TAG: css

文章评论 (0)

    • 这篇文章还没有收到评论,赶紧来抢沙发吧~


Top