snap+TweenMax+svg实现可输入彩色火柴拼凑字母显示文字动画效果代码

代码语言:html

所属分类:动画

代码描述:snap+TweenMax+svg实现可输入彩色火柴拼凑字母显示文字动画效果代码,可输入字母实时动画拼凑显示。

代码标签: snap TweenMax svg 输入 彩色 火柴 拼凑 字母 显示 文字 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

<style>
    @import 'https://fonts.googleapis.com/css?family=Catamaran';
html,
body,
.background {
  width: 100%;
  height: 100%;
}

.background {
  position: relative;
  background: linear-gradient(120deg, rgba(50, 150, 100, 0.6), rgba(0, 0, 100, 0));
}
.background:before, .background:after {
  position: absolute;
  content: " ";
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 200, 0.6), rgba(0, 0, 200, 0));
}
.background:after {
  background: linear-gradient(240deg, rgba(150, 50, 50, 0.6), rgba(0, 0, 200, 0));
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Catamaran", sans-serif;
}

body {
  background: #eeeeff;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

svg {
  z-index: 10;
}
svg .letter {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-miterlimit: 10;
}

.blinky-mcblinkface {
  -webkit-animation: 1s blink step-end infinite;
          animation: 1s blink step-end infinite;
}

@-webkit-keyframes "blink" {
  from, to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

@keyframes "blink" {
  from, to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
#toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
}
#toggle a {
  color: white;
  text-decoration: none;
}
#toggle a:hover {
  color: #eee;
}
</style>
</head>
<body>
<!-- partial:index.partial.html -->
<div class="container background">
	<svg id="svg">
		<defs>
			
<g id="letter-z">
	<path class="letter" d="M16.3,24.5l-29.1-2.1l29.1-39.5h-29.1"/>
</g>
<g id="letter-y&qu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0