div+css实现原子核运动动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现原子核运动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--bg: #FBF7F4;
--clr: #AEE1CD;
}
div {
box-sizing: border-box;
transform-style: preserve-3d;
}
body {
display: grid;
place-content: center;
margin: 0;
min-height: 100vh;
background-color: var(--bg);
}
.nucl {
position: relative;
width: 10vmin;
height: 10vmin;
background: radial-gradient(circle, #3cf 50%, #0000 0) 50% 50%/60% 60% space, radial-gradient(circle, #3fc 50%, #0000 0) 50% 15%/60% 40% space, radial-gradient(circle, #f9c 50%, #0000 0) 50% 50%/50% 90% space, radial-gradient(circle, #3cf 50%, #0000 0) 0 0/45% 45% space;
animation: turn 60s linear infinite forwards;
}
.nucl .ele {
width: 50vmin;
height: 20vmin;
border-radius: 100%;
border: 1px dashed color-mix(in lab, var(--clr), #0000 50%);
position: absolute;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0