css-doodle实现多彩水晶灯吊坠旋转效果
代码语言:html
所属分类:动画
代码描述:基于css-doodle,通过编写css来模拟水晶灯效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html, body {
height: 100%;
margin: 0;
display: grid;
place-items: center;
background: #1a1b30;
}
</style>
</head>
<body translate="no">
<style>
css-doodle {
--phi: @calc(4 * π / @size * @i);
--theta: @calc(10 * π / @size * @i);
--r: 24vmin;
--c: @p(#f85f73, #fbe8d3, #928a97);
--rule: (
:doodle {
@grid: 240x1 / 60vmin;
margin-top: -120px;
perspective: 5000px;
transform-style: preserve-3d;
animation: r 20s linear infinite;
}
transform:
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0