3d动画演示交流电与直流电的区别代码
代码语言:html
所属分类:动画
代码描述:3d动画演示交流电与直流电的区别代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>交流电与直流电 - 3D动画演示</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', sans-serif;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
min-height: 100vh;
color: #fff;
overflow-x: hidden;
}
.header {
text-align: center;
padding: 30px 20px;
background: rgba(0,0,0,0.3);
backdrop-filter: blur(10px);
}
.header h1 {
font-size: 2.5em;
margin-bottom: 10px;
background: linear-gradient(90deg, #00d2ff, #3a7bd5);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.header p {
color: #aaa;
font-size: 1.1em;
}
.main-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 30px;
padding: 30px;
max-width: 1600px;
margin: 0 auto;
}
.demo-box {
background: rgba(255,255,255,0.05);
border-radius: 20px;
padding: 25px;
flex: 1;
min-width: 350px;
max-width: 700px;
border: 1px solid rgba(255,255,255,0.1);
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.demo-box.dc {
border-top: 4px solid #4CAF50;
}
.demo-box.ac {
border-top: 4px solid #FF6B6B;
}
.demo-title {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 20px;
}
.demo-title h2 {
font-size: 1.8em;
}
.demo-title.dc h2 {
color: #4CAF50;
}
.demo-title.ac h2 {
color: #FF6B6B;
}
.demo-title .icon {
font-size: 2.5em;
}
.canvas-container {
position: relative;
width: 100%;
height: 300px;
background: rgba(0,0,0,0.3);
border-radius: 15px;
overflow: hidden;
margin-bottom: 20px;
}
.direction-indicator {
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
padding: 8px 20px;
border-radius: 20px;
font-weight: bold;
font-size: 1.1em;
z-index: 10;
}
.dc .direction-indicator {
background: rgba(76, 175, 80, 0.8);
}
.ac .direction-indicator {
background: rgba(255, 107, 107, 0.8);
transition: all 0.1s;
}
.wave-container {
width: 100%;
height: 150px;
background: rgba(0,0,0,0.3);
border-radius: 15px;
overflow: hidden;
margin-bottom: 20px;
}
.info-panel {
background: rgba(255,255,255,0.05);
border-radius: 12px;
padding: 15px;
margin-top: 15px;
}
.info-panel h3 {
color: #ffd700;
margin-bottom: 10px;
font-size: 1.1em;
}
.info-panel ul {
list-style: none;
padding-left: 0;
}
.info-panel li {
padding: 8px 0;
border-bottom: 1px solid rgba(255,255,255,0.1);
display: flex;
align-items: center;
gap: 10px;
}
.info-panel li:last-child {
border-bottom: none;
}
.info-panel li::before {
content: "⚡";
}
.current-display {
display: flex;
justify-content: space-around;
margin-top: 15px;
padding: 15px;
background: rgba(0,0,0,0.2);
border-radius: 10px;
}
.current-value {
text-align: center;
}
.current-value .label {
font-size: 0.9em;
color: #888;
}
.current-value .val.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0