<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>涟漪的效果</title>
<style>
@keyframes myfirst
{
from {border:0 solid #E4684D; left:1px;top: 1px;}
to {border:12px solid #E4684D; left:-11px;top: -11px;}
}
@-moz-keyframes myfirst
{
from {border:0 solid #E4684D; left:1px;top: 1px;}
to {border:12px solid #E4684D; left:-11px;top: -11px;}
}
@-webkit-keyframes myfirst
{
from {border:0 solid #E4684D; left:1px;top: 1px;}
to {border:12px solid #E4684D; left:-11px;top: -11px;opacity: 0;}
}
@-o-keyframes myfirst
{
from {border:0 solid #E4684D; left:1px;top: 1px;}
to {border:12px solid #E4684D; left:-11px;top: -11px;}
}
.box {
background-position: 0 0;
margin: 300px auto;
border-radius: 50%;
width: 86px;
height: 86px;
background: url(http://imgcache.qq.com/ac/www_tencent/join/images/icon_post.png) no-repeat 0 0;
position: relative;
/*#E4684D*/
}
.box:after {
content: "";
display: block;
height: 84px;
width: 84px;
border-radius: 84px;
position: absolute;
border:0 solid #E4684D;
left:-1px;
top: -1px;
opacity: 1;
}
.box:hover:after {
animation: myfirst 0.5s;
-moz-animation: myfirst 0.5s;
-webkit-animation: myfirst 0.5s;
-o-animation: myfirst 0.5s;
}
</style>
</head>
<body>
<div class="box"">
</div>
</body>
</html>
1.在after里面要定义好要改变的属性,在这里是border和left, top
2,在hover里面定义好引用的动画和时间
本文介绍如何利用CSS3的伪元素和动画效果来实现涟漪视觉效果。重点在于调整`after`选择器的`border`和`left`, `top`属性,并在`:hover`状态下定义动画及过渡时间。"
106032765,9587451,解决Python3.8在Win10中导入sklearn失败的问题,"['python', '机器学习', '经验分享']
815

被折叠的 条评论
为什么被折叠?



