css+js实现3d翻转数字时钟显示时间代码
代码语言:html
所属分类:布局界面
代码描述:css+js实现3d翻转数字时钟显示时间代码
代码标签: css js 3d 翻转 数字 时钟 显示 时间 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> /* Background */ body { background: linear-gradient(to bottom, #2e2e2e, #1a1a1a); display: flex; justify-content: center; align-items: center; height: 100vh; font-family: 'Courier New', monospace; } /* Clock Container */ .clock { display: flex; gap: 15px; perspective: 600px; } /* Flip Card */ .flip-card { position: relative; width: 80px; height: 100px; font-size: 3rem; text-align: center; background: #3d3d3d; color: #fff; border-radius: 8px; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); overflow: hidden; } /* Upper & Lower Part */ .flip-card .top, .flip-card .bottom { position: absolute; width: 100%; height: 50%; background: linear-gradient(to bottom, #5a5a5a, #3d3d3d); border-radius: 8px; } .flip-card .top { top: 0; line-height: 50px; border-bottom: 2px solid #2a2a2a; } .flip-card .bottom { bottom: 0; line-height: 50px; } /* Flip Animation */ .flip-card .flip { position: absolute; width: 100%; height: 50%; background: linear-gradient(to.........完整代码请登录后点击上方下载按钮下载查看
网友评论0