css实现中国亲戚关系图谱称呼折叠树状图图表代码
代码语言:html
所属分类:图表
代码描述:css实现中国亲戚关系图谱称呼折叠树状图图表代码
代码标签: css 中国 亲戚 关系 图谱 称呼 折叠 树状图 图表 代码
下面为部分代码预览,完整代码请点击下载或在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>个性化中国亲戚关系图谱</title> <style> /* --- 全局样式 --- */ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; background-color: #f8f9fa; color: #343a40; line-height: 1.6; margin: 0; padding: 20px; } .container { width: 100%; max-width: 1200px; margin: 0 auto; background-color: #fff; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); padding: 25px 30px; } h1 { color: #d9534f; text-align: center; border-bottom: 2px solid #e74c3c; padding-bottom: 10px; margin-top: 0; } /* --- 控制区样式 --- */ .controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; margin-bottom: 25px; padding: 15px; background-color: #f1f3f5; border-radius: 8px; } .gender-selector button { padding: 10px 20px; font-size: 1em; cursor: pointer; border: 2px solid transparent; border-radius: 20px; transition: all 0.3s ease; background-color: #e9ecef; color: #495057; } .gender-selector button.active { background-color: #d9534f; color: white; border-color: #c82333; font-weight: bold; } /* --- 标签页样式 --- */ .tabs { display: flex; justify-content: center; border-bottom: 2px solid #dee2e6; margin-bottom: 20px; } .tab-link { padding: 10px 25px; cursor: pointer; font-size: 1.2em; font-weight: 500; color: #6c757d; border-bottom: 3px solid transparent; transition: all 0.3s ease; margin-bottom: -2px; } .tab-link:hover { color: #007bff; } .tab-link.active { color: #d9534f; border-bottom-color: #d9534f; } /* --- 树状图容器 --- */ .tree-container { width: 100%; overflow-x: auto; padding-bottom: 20px; } .tab-content { display: none; } .tab-content.active { display: block; } /* --- 树状图核心样式 (与之前版本类似) --- */ .tree { display: flex; justify-content: center; } .tree ul { padding-top: 20px; position: relative; transition: all 0.5s; display: flex; justify-content: center; } .tree li { text-align: center; list-style-type: none; position: relative; padding: 20px 5px 0 5px; } .tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px soli.........完整代码请登录后点击上方下载按钮下载查看
网友评论0