body
{
align-items:center;
background:#222;
display:flex;
height:100%;
justify-content:center;
margin:0;
}
html
{
height:100%;
}
.avatar
{
height:200px;
position:relative;
width:200px;
}
.avatar img
{
border-radius:9999px;
height:100%;
position:relative;
width:100%;
z-index:2;
}
25%
{
border-color:hsl(90,100%,50%);
}
50%
{
border-color:hsl(180,100%,50%);
}
75%
{
border-color:hsl(270,100%,50%);
}
100%
{
border-color:hsl(360,100%,50%);
}
.avatar::before,.avatar::after
{
-webkit-animation:pulse 2s linear infinite;
animation:pulse 2s linear infinite;
border:#fff solid 8px;
border-radius:9999px;
box-sizing:border-box;
content:' ';
height:140%;
left:-20%;
opacity:.6;
position:absolute;
top:-20%;
transform:scale(0.714);
width:140%;
z-index:1;
}
.avatar::after
{
-webkit-animation-delay:1s;
animation-delay:1s;
}
.avatar:hover img
{
content:url('http://s.blixt.org/hypnotoad.jpg');
}
.avatar:hover::before,.avatar:hover::after
{
-webkit-animation:pulse 1s linear infinite,cycle-colors 6s linear infinite;
animation:pulse 1s linear infinite,cycle-colors 6s linear infinite;
}
.avatar:hover::after
{
-webkit-animation-delay:.5s;
animation-delay:.5s;
}
css3圆形头像扩散发光特效
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 网上太多抄袭的demo,但是都没有很好的效果,所以自己实现了一个,留给需要的人,话不多说 直接上代码吧。 这个我是...