TweenMax+jquery-ui实现动态炫酷饼图动画显示效果代码

代码语言:html

所属分类:图表

代码描述:TweenMax+jquery-ui实现动态炫酷饼图动画显示效果代码

代码标签: TweenMax jquery-ui 动态 炫酷 饼图 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/jquery-ui-1.11.0.min.css">

    <style>
        body {
          background-color: #4285F4;
          background: linear-gradient(to right, #ed30a0 0%, #0b86a6 100%);
        }
        
        body,
        html {
          height: 100%;
          width: 100%;
          margin: 0;
          padding: 0;
        }
        
        #slider {
          width: 300px;
          position: relative;
          margin: 30px auto;
        }
        
        .container {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 750px;
          height: 500px;
        }
        
        svg {
          width: 100%;
          height: 100%;
          visibility: hidden;
        }
        
        .sans-light {
          font-family: "open-sans", sans-serif;
          font-weight: 300;
          font-style: normal;
        }
        
        .sans-semi {
          font-family: "open-sans", sans-serif;
          font-weight: 600;
          font-style: normal;
        }
        
        .serif {
          font-family: "ff-meta-serif-web-pro", serif;
          font-weight: 500;
          font-style: normal;
        }
        
        .me {
          position: fixed;
          z-index: 1000;
          top: 24px;
          left: 24px;
          display: flex;
          flex-direction: column;
        }
        
        .me__link {
          position: relative;
          margin-bottom: 16px;
          color: white;
          font-family: Helvetica, sans-serif;
          text-decoration: none;
          font-size: 16px;
        }
        .me__link span {
          display: block;
          position: absolute;
          bottom: -3px;
          left: 0;
          height: 1px;
          width: 5%;
          background-color: white;
          content: "";
          transition: width 0.3s;
        }
        .me__link:hover span {
          width: 100%;
        }
        
        .twitter {
          position: fixed;
          top: 16px;
          right: 24px;
          display: block;
          width: 40px;
          height: 40px;
        }
    </style>



</head>

<body>
    <!-- <div id="slider"></div> -->
    <div class="container">

        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 778 590">
		<title>media-type-svg-3</title>
		<circle class="mt-base" cx="389" cy="294" r="209" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="1.01" opacity="0.3" />
		<path class="mt-base-2" d="M559,294A170,170,0,1,1,389,124,170,170,0,0,1,559,294Z" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="40" />
		<g class="mt-rings" fill="none" stroke-miterlimit="10" stroke-width="10" >
			<path class="mt-base-2-track" d="M389,124A170,170,0,1,1,219,294,170,170,0,0,1,389,124Z" stroke="#eeeeee" />
			<path class="mt-ring mt-ring-0" d="M389,124A170,170,0,1,1,219,294,170,170,0,0,1,389,124Z" stroke="#00a2d1" />
			<path class="mt-ring mt-ring-1" d="M389,124A170,170,0,1,1,219,294,170,170,0,0,1,389,124Z" stroke="#0ad100" />
			<path class="mt-ring mt-ring-2" d="M389,124A170,170,0,1,1,219,294,170,170,0,0,1,389,124Z" stroke="#f67521" />
			<path class="mt-ring mt-ring-3" d="M389,124A170,170,0,1,1,219,294,170,170,0,0,1,389,124Z" stroke="#f60d1a" />
			<text class="mt-text sans-light" x="308" y="303" font-size="30" fill="#fff" >MEDIA TYPE</text>
		</g>
		<g class="mt-perc-lines">
			<rect class="mt-perc-line" x="388" y="94" width="2" height="49" fill="#fff" />
			<rect class="mt-perc-line" x="388" y="94" width="2" height="49" fill="#fff" />
			<rect class="mt-perc-line" x="388" y="94" width="2" height="49" fill="#fff" />
			<rect class="mt-perc-line" x="388" y="94" width="2" height="49" fill="#fff" />
		</g>
		<line class="mt-line" x1="389" y1="294" x2="389" y2="94" fill="#fff" stroke="#fff" stroke-miterlimit="10" stroke-width="2" />
		<g class="mt-markers" fill="none" stroke="#fff" stroke-miterlimit="10">
			<line class="mt-marker mt-marker-0" x1="389.5" y1="107" x2="389.5" y2="17" />
			<line class="mt-marker mt-marker-1" x1="389.5" y1="107" x2="389.5" y2="17" />
			<line class="mt-marker mt-marker-2" x1="389.5" y1="107" x2="389.5" y2="17" />
			<line class="mt-marker mt-marker-3" x1="389.5" y1="107" x2="389.5" y2="17" />
		</g>
		<g class="mt-figures">
			<text class="sans-light" x="260" y="20" font-size="14" fill="#fff" >ONLINE - <tspan cla×
ss="sans-semi">4%</tspan></text>
			<text class="sans-light" x="578" y="78" font-size="14" fill="#fff" >RADIO - <tspan class="sans-semi">22%</tspan></text>
			<text class="sans-light" x="664" y="398" font-size="14" fill="#fff" >TV - <tspan class="sans-semi">17%</tspan></text>
			<text class="sans-light" x="56" y="432" font-size="14" fill="#fff" >PRINT - <tspan class="sans-semi">57%</tspan></text>
		</g>
	</svg>

    </div>




    <script type="text/javascript" src="/.........完整代码请登录后点击上方下载按钮下载查看

网友评论0