使用css3制作齿轮loading动画效果

栏目: CSS · 发布时间: 5年前

内容简介:这是一款基于css3齿轮loading动画特效。该特效使用font-awesome字体图标的齿轮图标作为图案,通过CSS3 animation来制作三个齿轮的运动效果。

这是一款基于css3齿轮loading动画特效。该特效使用font-awesome字体图标的齿轮图标作为图案,通过CSS3 animation来制作三个齿轮的运动效果。

查看演示 下载源码

HTML

首先在页面中引入font-awesome文件。

<link href="

然后在放置动画的位置加上HTML结构:

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div id="loader-wrapper">
                <div id="loader1" class="fa fa-cog loader"></div>
                <div id="loader2" class="fa fa-cog loader"></div>
                <div id="loader3" class="fa fa-cog loader"></div>
            </div>
        </div>
    </div>
</div>

CSS样式

然后通过下面的CSS样式来制作齿轮的动画效果。

#loader-wrapper {
    width: 60px;
    height: 60px;
    margin: auto;
    position: relative;
}
.loader{ position: absolute; }
#loader1{
    color: #3A4652;
    font-size: 35px;
    text-align: center;
    width: 35px;
    height: 35px;
    top: -20px;
    left: 3px;
    animation: animate-1 1s infinite linear;
}
#loader2{
    color: #d72f2b;
    font-size: 50px;
    text-align: center;
    height: 50px;
    width: 50px;
    right: -12px;
    animation: animate-2 1s infinite linear;
}
#loader3{
    color: #3A4652;
    font-size: 35px;
    text-align: center;
    width: 35px;
    height: 35px;
    bottom: -10px;
    left: 3px;
    animation: animate-3 1s infinite linear;
}
@keyframes animate-1{
    100% { transform: rotate(-180deg); }
}
@keyframes animate-2{
    100% { transform: rotate(180deg); }
}
@keyframes animate-3{
    100% { transform: rotate(-180deg); }
}

以上所述就是小编给大家介绍的《使用css3制作齿轮loading动画效果》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Text Algorithms

Text Algorithms

Maxime Crochemore、Wojciech Rytter / Oxford University Press / 1994

This much-needed book on the design of algorithms and data structures for text processing emphasizes both theoretical foundations and practical applications. It is intended to serve both as a textbook......一起来看看 《Text Algorithms》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具