css实现图片悬浮边框动画效果代码
代码语言:html
所属分类:悬停
代码描述:css实现图片悬浮边框动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
/* number of small circles */
@property --n {
syntax: "<number>";
initial-value: 0;
inherits: true;
}
@property --i {
syntax: "<length>";
initial-value: 0px;
inherits: true;
}
@property --a {
syntax: "<angle>";
initial-value: 0deg;
inherits: true;
}
img {
--r: 30px;
/* control the small circles size */
--g: 8px;
/* the gap */
--c: #355C7D,#F8B195,#C06C84;
/* the gradient coloration */
width: 250px;
aspect-ratio: 1;
--i: calc(var(--g) + var(--r));
--n: 200;
--a: 72deg;
padding: calc(var(--g) + var(--r));
border-radius: 50%;
-webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(50% 50%, var(--c) calc(100% - 1px), #0000) no-repeat calc(50% + (50% - var(--i))*cos(360deg*1/(20 + var(--n)) + var(--a))) calc(50% + (50% - var(--i))*sin(360deg*.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0