svg路径动画效果

代码语言:html

所属分类:动画

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

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

    <style>
        * {
            box-sizing: border-box;
            padding: 0;
            margin: 0;
        }
        /* center in the viewport */
        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        body > svg {
            display: block;
            width: 80vw;
            max-width: 500px;
            height: auto;
        }

        /* animate the group describing the bicycle along a prescribed path */
        #bicycle {
            offset-path: path("M 0 0 l 200 -200 a 50 50 0 0 1 50 0 l 100 100 a 50 50 0 0 0 50 0 l 125 -125");
            of.........完整代码请登录后点击上方下载按钮下载查看

网友评论0