svg实现敲代码的蛋蛋动画效果代码
代码语言:html
所属分类:动画
代码描述:svg实现敲代码的蛋蛋动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
box-sizing: border-box;
}
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #26324a;
background: #36393f;
}
.eggo {
height: 50vmin;
}
.eggo__lines {
-webkit-animation: code 1s infinite linear;
animation: code 1s infinite linear;
}
@-webkit-keyframes code {
to {
transform: translate(0, -125px);
}
}
@keyframes code {
to {
transform: translate(0, -125px);
}
}
</style>
</head>
<body>
<svg class="eggo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 412.8">
<defs>
<g id="a">
<path opacity=".75" fill="#22da6e" stroke-width="7.1" d="M307.9 57.7h73.5V73h-73.5z"/>
<path opacity=".75" fill="#c792ea" stroke-width="9.9" d="M240.1 78.5h141.3v15.3H240.1z"/>
<path opacity=".75" fill="#21c7a8" stroke-width="8" d="M287.7 99.3h93.6v15.3h-93.6z"/>
<path opacity=".75" fill="#f78c6c" stroke-width="6..........完整代码请登录后点击上方下载按钮下载查看
















网友评论0