anime实现svg动画效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Fira Sans', sans-serif;
font-size: 16px;
color: #2c2c2c;
}
body a {
color: inherit;
text-decoration: none;
}
.btn {
-webkit-transition-property: all;
transition-property: all;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
-webkit-transition-timing-function: linear;
transition-timing-function: linear;
-webkit-transition-delay: 0s;
transition-delay: 0s;
padding: 10px 20px;
display: inline-block;
margin-right: 10px;
background-color: #fff;
border: 1px solid #2c2c2c;
border-radius: 3px;
cursor: pointer;
outline: none;
}
.btn:last-child {
margin-right: 0;
}
.btn:hover, .btn.js-active {
color: #fff;
background-color: #2c2c2c;
}
.header {
max-width: 600px;
margin: 50px auto;
text-align: center;
}
.header__title {
margin-bottom: 30px;
font-size: 2.1rem;
}
.content {
width: 95%;
margin: 0 auto 50px;
}
.content__inner {
display: grid;
grid-template-columns: repeat(5, 100px);
grid-gap: 60px;
-webkit-box-pack: center;
justify-content: center;
}
.icon-block {
width: 100px;
text-align: center;
}
.icon-block .icon {
width: 100%;
height: 100px;
}
.icon-block svg {
width: 100%;
height: 100%;
overflow: visible;
}
.icon-block__replay {
margin-top: 15px;
}
</style>
</head>
<body translate="no">
<header class="header">
<h1 class="header__title">SVG icon animations with Anime.js</h1>
<div class="header__btns btns">
<a class="header__btn btn" h.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0