CSS3常用动画

渐变缩放圆圈
渐变缩放圆圈

<style>
.circle{
    position: relative;
    z-index:1;
    margin:400px auto;
    height:2px;
    width:2px;
    background:#2095ff;
    border-radius:50%;
    animation:circle .7s linear infinite; /*infinite使动画无线循环*/
}
.circle span{
    position: absolute;
    z-index:0;
    top:-1px;
    left:-1px;
    height:4px;
    width:4px;
    background:#2095ff;
    border-radius:50%;
    animation:span .7s linear infinite;
}
@keyframes circle{  /*circle 小--特大--大,透明-不透明--透明*/
    0% {transform:scale(0.1);opacity:0;}
    50% {transform:scale(1.5);opacity:1;}
    100% {transform:scale(1);opacity:0;}
}
@keyframes span{  /*span 小--较大,不透明--透明*/
    0% {transform:scale(0.1);opacity:1;}
    100% {transform:scale(1.2);opacity:0;}
}
</style>
<body>
    <div class="circle"><span></span></div>
</body>

css3圆环转盘
css3圆环转盘
infinite:持续动画;
linear :匀速动画;

<style>
.circle{height:100px;width:100px;border:100px solid;border-left-color:red;border-right-color:green;border-top-color:yellow;border-bottom-color:purple;border-radius:50%;margin:100px auto;
}
.circle.move{
    animation:rotate 1s infinite linear;
    -moz-animation:rotate 1s infinite linear;
    -webkit-animation:rotate 1s infinite linear;
    -o-animation: rotate 1s infinite linear;
}
@keyframes rotate{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}
@-webkit-keyframes rotate{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}
@-moz-keyframes rotate{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}
@-o-keyframes rotate{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}
}
</style>

<div class="circle move"></div>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值