zoukankan      html  css  js  c++  java
  • svg(二)---半瓶子晃荡

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
    </head>
    <style>
        html{
            height: 100%;
        }
        body{
            position: relative;
            top:50%;left: 50%;
            transform: translate(-50%,-50%);
            height: 100%;
            margin: 0;
        }
    </style>
    <body>
        <svg  width="200" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg">
            <text text-anchor='middle' font-size='42px' transform='translate(100,120)' fill='#000'>50.0%</text>
            <g>
                <!-- M:将画笔移到指定的坐标位置
                C:三次贝赛曲线
                A:弧线
                Z:关闭路径 -->
                <path fill='rgba(154,205,50,.8)' d='M 0 100 C 140.6 94.24 45.08 106.32 2000 100 A 95 95 0 0 1 0 100 Z'>
                    <animate dur='5s' repeatCount='indefinite' attributeName='d' attributeType='XML' values='
                    M 0 100 C 90 28,92 179,200 100 A 95 95 0 0 1 0 100 Z;
                    M 0 100 C 145 100,41 100,200 100 A 95 95 0 0 1 0 100 Z;
                    M 0 100 C 90 28,92 179,200 100 A 95 95 0 0 1 0 100 Z;'></animate>
                </path>
            </g>
            <circle cx='100' r='80' cy='100' stroke-width='10' stroke='white' fill='transparent'></circle>
            <circle cx='100' r='90' cy='100' stroke-width='20' stroke='yellowgreen' fill='none'></circle>
        </svg>
    </body>
    </html>

  • 相关阅读:
    phpstorm 破解方法
    shell_exec
    数据库配置
    sprintf
    MySQL优化步 (InnoDB)
    Python小白需要知道的 20 个骚操作!
    Python常用库整理
    Python:什么是进阶,如何进阶?
    Python中标准模块importlib详解
    Python开发【Django】:中间件、CSRF
  • 原文地址:https://www.cnblogs.com/peiyao/p/7344445.html
Copyright © 2011-2022 走看看