css 圆形光晕,CSS实现运动光环

css实现运动光环的小Demo

效果图:

0a413e248c22e3f1e704ff7843556266.png

实现代码:

代码分析:

Demo用到知识点:

1.CSS的常用选择器,transform属性居中

2.css的动画效果,动画延迟,

3.filer:模糊

HTML结构:

圆形光环

CSS代码:

*{

margin: 0px;

padding: 0px;

}

body{

/* background-color: #050604; */

background-image: url(‘http://pic.netbian.com/uploads/allimg/170904/155001-150451140195fd.jpg‘);

/* background-repeat:repeat-x; */

background-size: 100% ;

}

ul{

list-style: none;

}

ul li{

position: absolute;

top: 50%;

left: 50%;

transform: translate(-50%,-50%);

background-color: yellow;

width: 400px;

height: 400px;

border-radius: 60% 40% 40% 60% / 60% 40% 60% 40%;

animation: ani 30s linear infinite;

filter: blur(5px);

mix-blend-mode: screen;

}

ul li:nth-of-type(2){

background-color: purple;

animation-delay: -10s;

}

ul li:nth-of-type(3){

background-color: blue;

animation-delay: -20s;

}

@keyframes ani{

from{

transform: translate(-50%,-50%) rotate(0deg);

}

to{

transform: translate(-50%,-50%) rotate(360deg);

}

}

.box::after{

content: ‘‘;

position: absolute;

top: 50%;

left: 50%;

transform: translate(-50%,-50%);

background-color: #000000;

width: 400px;

height: 400px;

border-radius: 50%;

z-index: 20;

}

原文:https://www.cnblogs.com/HelloBytes/p/13095417.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值