css实现点沿着线条轨迹滚动动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现点沿着线条轨迹滚动动画效果代码

代码标签: 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.745.........完整代码请登录后点击上方下载按钮下载查看

网友评论0