js+css实现等距婵原则立体柱体动画效果代码
代码语言:html
所属分类:动画
代码描述:js+css实现等距婵原则立体柱体动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Arial", sans-serif;
background: radial-gradient(
circle at center,
#2a2a4a 0%,
#1a1a2e 70%,
#0d0d1a 100%
);
color: white;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
overflow: hidden;
position: relative;
}
.container {
text-align: center;
width: 100%;
z-index: 1;
}
h1 {
margin-bottom: 2rem;
font-size: 2.5rem;
text-transform: uppercase;
letter-spacing: 3px;
text-shadow: 0 0 10px rgba(102, 252, 241, 0.7);
animation: glow 2s ease-in-out infinite alternate;
position: relative;
}
h1::after {
content: "";
position: absolute;
left: 50%;
bottom: -10px;
transform: translateX(-50%);
width: 0;
height: 3px;
background: linear-gradient(90deg, transparent, #66fcf1, transparent);
animation: line-grow 3s ease-in-out infinite;
}
.isometric-grid {
position: relative;
margin: 0 auto;
width: 80vmin;
height: 80vmin;
perspective: 1000px;
transform-style: preserve-3d;
transform: rotateX(60deg) rotateZ(45deg);
animation: gridFloat 20s ease-in-out infinite alternate;
}
.tile {
position: absolute;
width: 10%;
height: 10%;
transform-style: preserve-3d;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
opacity 0.3s;
backface-visibility: hidden;
}
.tile-face {
position: absolute;
width: 100%;
height: 100%;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
backface-visibility: hidden;
transition: all 0.3s;
}
.tile-top {
transform: translateZ(0);
background: var(--top-color);
box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.2);
}
.tile-left {
transform: rotateY(90deg) translateZ(0);
width: 100%;
height: 100%;
transform-origin: left;
background: var(--left-color);
}
.tile-right {
transform: rotateX(90deg) translateZ(0);
width: 100%;
height: 100%;
transform-origin: top;
background: var(--right-color);
}
.tile-glow {
position: absolute;
top: -20%;
left: -20%;
width: 140%;
height: 140%;
border-radius: 50%;
background: radial-gradient(
circle,
rgba(255, 255, 255, 0.8) 0%,
rgba(255, 255, 255, 0) 70%
);
opacity: 0;
pointer-events: none;
z-index: 5;
animation: pulse 3s ease-in-out infinite;
}
.active-tile .tile-glow {
opacity: 0.6;
animation: pulse 1s ease-in-out .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0