js+css实现动态饼图效果代码

代码语言:html

所属分类:图表

代码描述:js+css实现动态饼图效果代码

代码标签: 饼图 效果

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

<!DOCTYPE html>
<html >
<head>
	<meta charset="UTF-8">
<style>
    *,
*:before,
*:after
{
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}

body
{
    position: relative;

    margin: 0;

    background: #434a54;

    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.row
{
    display: block;

    width: 300px;
    margin: 50px auto;

    -webkit-animation: fadeIn .4s ease-in .4s both;
            animation: fadeIn .4s ease-in .4s both;
}
.row:before,
.row:after
{
    display: table;

    content: ' ';
}
.row:after
{
    clear: both;
}
@media only screen and (min-width: 600px)
{
    .row
    {
        width: 600px;
    }
}

.column
{
    float: left;

    width: 300px;
    padding: 25px;
}

@-webkit-keyframes fadeIn
{
    0%
    {
        opacity: 0;
    }

    100%
    {
        opacity: 1;
    }
}

@keyframes fadeIn
{
    0%
    {
        opacity: 0;
    }

    100%
    {
        opacity: 1;
    }
}
/**
  * Donut Chart
  * --------------------------------------------------
  */
.donut-chart
{
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    position: relative;

    overflow: hidden;

    width: 250px;
    height: 250px;

    border-radius: 50%;
    background-color: #f5f7fa;
    -webkit-box-shadow: 0 0 0 6px rgba(0, 0, 0, .2);
            box-shadow: 0 0 0 6px rgba(0, 0, 0, .2);
}

.outer-circle,
.inner-circle
{
    position: absolute;

    border-radius: 50%;
}

.outer-circle
{
    top: 6%;
    right: 6%;
    bottom: 6%;
    left: 6%;

    background-color: #fff;
    -webkit-box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .2);
            box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .2);
}

.inner-circle
{
    top: 22%;
    right: 22%;
    bottom: 22%;
    left: 22%;

    background-color: #f5f7fa;
    -webkit-box-shadow: 0 0 0 6px rgba(0, 0, 0, .2);
           .........完整代码请登录后点击上方下载按钮下载查看

网友评论0