div+css实现dna螺旋动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现dna螺旋动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--color-primary: #00d9ff;
--color-secondary: #ec1583;
--color-tertiary: #deee75;
--color-quaternary: #9375ee;
--color-surface: #191919;
}
@property --rotate-y {
syntax: "<angle>";
inherits: true;
initial-value: 0deg;
}
@property --rotate {
syntax: "<angle>";
inherits: true;
initial-value: 45deg;
}
@property --gap {
syntax: "<length>";
inherits: true;
initial-value: 0;
}
@-webkit-keyframes dna {
from {
--rotate-y: 0deg;
}
to {
--rotate-y: 360deg;
}
}
@keyframes dna {
from {
--rotate-y: 0deg;
}
to {
--rotate-y: 360deg;
}
}
@-webkit-keyframes rotate-container {
from {
--rotate: 42deg;
}
50% {
--rotate: 142deg;
}
to {
--rotate: 42deg;
}
}
@keyframes rotate-container {
from {
--rotate: 42deg;
}
50% {
--rotate: 142deg;
}
to {
--rotate: 42deg;
}
}
.container {
filter: url(#blurFilter) contrast(1.5) brightness(1.5) saturate(0.6);
position: absolute;
transform: scale(0.8);
}
.dna {
--width: 11rem;
--count: 42;
display: flex;
flex-direction: column;
z-index: 1111;
perspective: 50rem;
-webkit-.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0