由css装载棒棒糖的棒棒糖样式

时间:2016-05-26 12:55:00

标签: css css-animations animate.css

我想在我的网页中创建一个加载微调器,它与android Lollipop加载微调器一样......有什么方法可以通过css创建它吗?

1 个答案:

答案 0 :(得分:1)

检查this网址

.circle-loader {
    margin-left: 48%;  
    fill: transparent;
    stroke: #009688;
    stroke-width: 5;
    animation: dash 2s ease infinite,rotate 2s linear infinite;
}

@keyframes dash {
    0% {
        stroke-dasharray: 1,95;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 85,95;
        stroke-dashoffset: -25;
    }
    100% {
        stroke-dasharray: 85,95;
        stroke-dashoffset: -93;
    }
}

@keyframes rotate {
    0% {transform: rotate(0deg); }
    100% {transform: rotate(360deg); }
}