css实现点沿着线条轨迹滚动动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现点沿着线条轨迹滚动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,500,700);
@-webkit-keyframes part {
0%, 100% {
opacity: 0.2;
}
50% {
opacity: 0.9;
}
}
@-moz-keyframes part {
0%, 100% {
opacity: 0.2;
}
50% {
opacity: 0.9;
}
}
@keyframes part {
0%, 100% {
opacity: 0.2;
}
50% {
opacity: 0.9;
}
}
body {
background-color: #09374e;
}
body, html {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#container {
max-width: 900px;
width: 100%;
overflow: hidden;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
}
svg {
height: 120vh;
width: auto;
}
path {
opacity: 0.2;
}
circle {
-moz-animation: part 1.6s infinite ease-in-out;
-webkit-animation: part 1.6s infinite ease-in-out;
animation: part 1.6s infinite ease-in-out;
}
</style>
</head>
<body>
<div id="container">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice" viewBox="0 0 471 610">
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
<path d="M227.745173,59.8673874 C227.745173,24.9630524 227.745173,38.488022 227.745173,100.442296 C227.745173,118.702088 227.745173,123.104678 227.745173,165.095628 C227.745173,207.086579 127,184.308214 127,230.873718 C127,280.843197 327,268.4034 327,334.933694 C327,388.790224 227.745173,366.626835 227.745173,408.76074 C227.745173,444.082917 227.745173,511.16267 227.745173,610" id="Line1" stroke-opacity="0.8" stroke="#FFFFFF"></path>
<path d="M227.745173,78.8673874 C227.745173,43.9630524 227.745173,57.488022 227.745173,119.442296 C227.745173,137.702088 227.745173,142.104678 227.745173,184.095628 C227.745173,226.086579 127,203.308214 127,249.873718 C127,299.843197 327,287.4034 327,353.933694 C327,407.790224 227.745173,385.626835 227.745173,427.76074 C227.745173,463.082917 227.745173,530.16267 227.745173,629" id="Line2" stroke="#FFFFFF"></path>
<path d="M227.745173,98.8673874 C227.745173,63.9630524 227.745173,77.488022 227.745173,139.442296 C227.745173,157.702088 227.745173,162.104678 227.745173,204.095628 C227.745173,246.086579 127,223.308214 127,269.873718 C127,319.843197 327,307.4034 327,373.933694 C327,427.790224 227.745173,405.626835 227.745173,447.76074 C227.745173,483.082917 227.745173,550.16267 227.745173,649" id="Line3" stroke-opacity="0.8" stroke="#FFFFFF"></path.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0