|
|
@@ -0,0 +1,389 @@
|
|
|
+# 学术海报 HTML/CSS 完整指南
|
|
|
+
|
|
|
+## 整体结构
|
|
|
+
|
|
|
+```html
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <title>论文标题 — Poster</title>
|
|
|
+ <style>/* 样式见下方 */</style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="poster">
|
|
|
+ <div class="header"><!-- 标题/作者/单位 --></div>
|
|
|
+ <div class="content"><!-- 3列网格 --></div>
|
|
|
+ <div class="footer"><!-- Data Availability / Funding --></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Lightbox -->
|
|
|
+ <div class="lightbox-overlay" id="lightbox">
|
|
|
+ <img id="lightbox-img" src="" alt="">
|
|
|
+ <div class="lightbox-hint">Click anywhere or press Esc to close</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <script>/* Lightbox JS 见下方 */</script>
|
|
|
+</body>
|
|
|
+</html>
|
|
|
+```
|
|
|
+
|
|
|
+## CSS 变量(配色方案)
|
|
|
+
|
|
|
+```css
|
|
|
+:root {
|
|
|
+ --primary: #1B3A4B;
|
|
|
+ --secondary: #065A82;
|
|
|
+ --accent: #00A7E1;
|
|
|
+ --warm: #E8927C;
|
|
|
+ --bg-light: #F4F7F9;
|
|
|
+ --bg-cream: #FAFBFC;
|
|
|
+ --text-dark: #1A1A2E;
|
|
|
+ --text-muted: #5A6B7D;
|
|
|
+ --gold: #D4A574;
|
|
|
+ --green-a: #2E8B57;
|
|
|
+ --red-b: #C85A54;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+## 3列网格布局
|
|
|
+
|
|
|
+```css
|
|
|
+.poster { width: 48in; background: var(--bg-cream); }
|
|
|
+
|
|
|
+.content {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: 1fr 1fr 1fr;
|
|
|
+ gap: 0.3in;
|
|
|
+ padding: 0.45in 0.55in;
|
|
|
+}
|
|
|
+
|
|
|
+/* 板块定位 */
|
|
|
+.background { grid-column: 1; grid-row: 1; }
|
|
|
+.study-design { grid-column: 1; grid-row: 2; }
|
|
|
+.methods-flow { grid-column: 1; grid-row: 3; }
|
|
|
+.results-1 { grid-column: 2; grid-row: 1; }
|
|
|
+.results-2 { grid-column: 2; grid-row: 2; }
|
|
|
+.results-3 { grid-column: 3; grid-row: 1; }
|
|
|
+.results-4 { grid-column: 3; grid-row: 2; }
|
|
|
+.conclusions { grid-column: 2 / 4; grid-row: 3; }
|
|
|
+```
|
|
|
+
|
|
|
+## 物种图标系统
|
|
|
+
|
|
|
+**原则**:不用 emoji,用 CSS 圆形缩写,确保跨平台一致。
|
|
|
+
|
|
|
+```css
|
|
|
+.sp-icon {
|
|
|
+ display: inline-flex; align-items: center; justify-content: center;
|
|
|
+ width: 0.22in; height: 0.22in; border-radius: 50%;
|
|
|
+ font-size: 0.11in; font-weight: 700; color: white;
|
|
|
+}
|
|
|
+.sp-icon.mammal-icon { background: var(--secondary); }
|
|
|
+.sp-icon.bird-icon { background: var(--warm); }
|
|
|
+.sp-icon.fish-icon { background: var(--green-a); }
|
|
|
+```
|
|
|
+
|
|
|
+```html
|
|
|
+<span class="sp-icon mammal-icon">Hu</span> Human
|
|
|
+<span class="sp-icon mammal-icon">Mo</span> Mouse
|
|
|
+<span class="sp-icon bird-icon">Ch</span> Chicken
|
|
|
+<span class="sp-icon fish-icon">Zf</span> Zebrafish
|
|
|
+```
|
|
|
+
|
|
|
+## 统计数据展示(stat-box)
|
|
|
+
|
|
|
+```css
|
|
|
+.stat-row { display: flex; gap: 0.15in; flex-wrap: wrap; }
|
|
|
+.stat-box {
|
|
|
+ flex: 1; min-width: 1in;
|
|
|
+ background: var(--bg-light); border-radius: 0.06in;
|
|
|
+ padding: 0.14in; text-align: center;
|
|
|
+ border-left: 3px solid var(--accent);
|
|
|
+}
|
|
|
+.stat-box .number {
|
|
|
+ font-size: 0.34in; font-weight: 900;
|
|
|
+ color: var(--secondary);
|
|
|
+}
|
|
|
+.stat-box .label {
|
|
|
+ font-size: 0.12in; color: var(--text-muted);
|
|
|
+ text-transform: uppercase; letter-spacing: 1px;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+## 发现卡片(finding-card)
|
|
|
+
|
|
|
+```css
|
|
|
+.finding-card {
|
|
|
+ background: var(--bg-light); border-radius: 0.06in;
|
|
|
+ padding: 0.15in; margin: 0.1in 0;
|
|
|
+ border-left: 4px solid var(--accent);
|
|
|
+}
|
|
|
+.finding-card.important {
|
|
|
+ border-left-color: var(--warm);
|
|
|
+ background: #FFF8F5;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+## CSS 流程图
|
|
|
+
|
|
|
+```css
|
|
|
+.flowchart {
|
|
|
+ display: flex; flex-direction: column;
|
|
|
+ align-items: center; gap: 0;
|
|
|
+}
|
|
|
+.flow-node {
|
|
|
+ background: white; border: 2px solid var(--secondary);
|
|
|
+ border-radius: 0.06in; padding: 0.1in 0.15in;
|
|
|
+ text-align: center; width: 90%;
|
|
|
+}
|
|
|
+.flow-node.primary-node {
|
|
|
+ background: var(--secondary); color: white;
|
|
|
+}
|
|
|
+.flow-arrow {
|
|
|
+ width: 2px; height: 0.18in; background: var(--secondary);
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.flow-arrow::after {
|
|
|
+ content: ''; position: absolute;
|
|
|
+ bottom: -4px; left: -4px;
|
|
|
+ border-left: 5px solid transparent;
|
|
|
+ border-right: 5px solid transparent;
|
|
|
+ border-top: 6px solid var(--secondary);
|
|
|
+}
|
|
|
+/* 分支节点 */
|
|
|
+.flow-branch {
|
|
|
+ display: grid; grid-template-columns: repeat(5, 1fr);
|
|
|
+ gap: 0.08in; width: 100%;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+## 折叠图表
|
|
|
+
|
|
|
+```css
|
|
|
+details.fig-collapse {
|
|
|
+ margin-top: 0.12in;
|
|
|
+ border: 1px solid #D8DEE4;
|
|
|
+ border-radius: 0.06in;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+details.fig-collapse summary {
|
|
|
+ background: var(--bg-light);
|
|
|
+ padding: 0.1in 0.14in;
|
|
|
+ font-weight: 700; color: var(--secondary);
|
|
|
+ cursor: pointer;
|
|
|
+ list-style: none;
|
|
|
+}
|
|
|
+details.fig-collapse summary::-webkit-details-marker { display: none; }
|
|
|
+
|
|
|
+/* CSS 箭头(不要在 HTML 中重复放箭头字符) */
|
|
|
+details.fig-collapse summary::before {
|
|
|
+ content: '\25B8';
|
|
|
+ color: var(--accent);
|
|
|
+ transition: transform 0.2s;
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 0.08in;
|
|
|
+}
|
|
|
+details.fig-collapse[open] summary::before {
|
|
|
+ transform: rotate(90deg);
|
|
|
+}
|
|
|
+
|
|
|
+/* 图片容器 */
|
|
|
+.fig-image-container {
|
|
|
+ text-align: center; margin: 0.08in 0;
|
|
|
+ border: 1px solid #E0E4E8; border-radius: 0.04in;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.fig-image-container img {
|
|
|
+ max-width: 100%; height: auto;
|
|
|
+ display: block; margin: 0 auto;
|
|
|
+ cursor: zoom-in;
|
|
|
+}
|
|
|
+.fig-image-container img:hover { opacity: 0.85; }
|
|
|
+.fig-caption {
|
|
|
+ font-size: 0.12in; color: var(--text-muted);
|
|
|
+ padding: 0.06in; background: var(--bg-light);
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+## Lightbox 放大查看
|
|
|
+
|
|
|
+```css
|
|
|
+.lightbox-overlay {
|
|
|
+ display: none; position: fixed;
|
|
|
+ top: 0; left: 0; width: 100%; height: 100%;
|
|
|
+ background: rgba(0,0,0,0.88);
|
|
|
+ z-index: 9999;
|
|
|
+ justify-content: center; align-items: center;
|
|
|
+ cursor: zoom-out;
|
|
|
+}
|
|
|
+.lightbox-overlay.active { display: flex; }
|
|
|
+.lightbox-overlay img {
|
|
|
+ max-width: 92%; max-height: 92%;
|
|
|
+ object-fit: contain; border-radius: 4px;
|
|
|
+ box-shadow: 0 8px 40px rgba(0,0,0,0.5);
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+```javascript
|
|
|
+(function(){
|
|
|
+ var overlay = document.getElementById('lightbox');
|
|
|
+ var lbImg = document.getElementById('lightbox-img');
|
|
|
+ document.querySelectorAll('.fig-image-container img').forEach(function(img){
|
|
|
+ img.addEventListener('click', function(){
|
|
|
+ lbImg.src = this.src;
|
|
|
+ lbImg.alt = this.alt;
|
|
|
+ overlay.classList.add('active');
|
|
|
+ });
|
|
|
+ });
|
|
|
+ overlay.addEventListener('click', function(){ overlay.classList.remove('active'); });
|
|
|
+ document.addEventListener('keydown', function(e){
|
|
|
+ if(e.key === 'Escape') overlay.classList.remove('active');
|
|
|
+ });
|
|
|
+})();
|
|
|
+```
|
|
|
+
|
|
|
+## 特殊字符速查表
|
|
|
+
|
|
|
+| 字符 | HTML 实体 | CSS content | 用途 |
|
|
|
+|------|----------|-------------|------|
|
|
|
+| ▶ | `▶` | `\25B6` | 折叠箭头 |
|
|
|
+| ▸ | `▸` | `\25B8` | 小三角 |
|
|
|
+| → | `→` | `\2192` | 右箭头 |
|
|
|
+| ➡ | `➡` | `\27A1` | 粗右箭头 |
|
|
|
+| — | `—` | `\2014` | 破折号 |
|
|
|
+| – | `–` | `\2013` | 短横线 |
|
|
|
+| † | `†` | `\2020` | 共同一作 |
|
|
|
+| ≥ | `≥` | - | 大于等于 |
|
|
|
+| ≤ | `≤` | - | 小于等于 |
|
|
|
+| × | `×` | - | 乘号 |
|
|
|
+| − | `−` | - | 减号 |
|
|
|
+| ↔ | `↔` | `\2194` | 双向箭头 |
|
|
|
+| © | `©` | - | 版权 |
|
|
|
+
|
|
|
+## 打印与预览
|
|
|
+
|
|
|
+```css
|
|
|
+@media print {
|
|
|
+ body { background: white; padding: 0; }
|
|
|
+ .poster { box-shadow: none; }
|
|
|
+ details.fig-collapse { open: true; }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+本地预览命令:
|
|
|
+```bash
|
|
|
+cd project_directory
|
|
|
+python3 -m http.server 8765
|
|
|
+# 访问 http://localhost:8765/poster.html
|
|
|
+```
|
|
|
+
|
|
|
+## 中英文双语切换
|
|
|
+
|
|
|
+### 语言切换按钮样式
|
|
|
+
|
|
|
+```css
|
|
|
+.lang-switch {
|
|
|
+ position: fixed;
|
|
|
+ top: 0.2in; right: 0.3in;
|
|
|
+ z-index: 100;
|
|
|
+ display: flex; gap: 2px;
|
|
|
+ background: rgba(255,255,255,0.95);
|
|
|
+ border-radius: 0.04in;
|
|
|
+ box-shadow: 0 2px 12px rgba(0,0,0,0.15);
|
|
|
+ overflow: hidden;
|
|
|
+ border: 1px solid #D8DEE4;
|
|
|
+}
|
|
|
+.lang-btn {
|
|
|
+ border: none; background: transparent;
|
|
|
+ padding: 0.06in 0.14in;
|
|
|
+ font-size: 0.13in; font-weight: 700;
|
|
|
+ color: var(--text-muted);
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.2s;
|
|
|
+}
|
|
|
+.lang-btn:hover { color: var(--secondary); }
|
|
|
+.lang-btn.active {
|
|
|
+ background: var(--secondary);
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+### HTML 双语标记规范
|
|
|
+
|
|
|
+所有需要翻译的文本元素加 `data-lang` 属性:
|
|
|
+
|
|
|
+```html
|
|
|
+<!-- 板块标题 -->
|
|
|
+<h2 class="section-title" data-lang="en">Background</h2>
|
|
|
+<h2 class="section-title" data-lang="zh">研究背景</h2>
|
|
|
+
|
|
|
+<!-- 段落内容 -->
|
|
|
+<p data-lang="en">The 3D architecture of the eukaryotic genome...</p>
|
|
|
+<p data-lang="zh">真核生物基因组的三维架构高度有序...</p>
|
|
|
+
|
|
|
+<!-- finding-card -->
|
|
|
+<div class="finding-card">
|
|
|
+ <h4 data-lang="en">Chromosome length governs architecture</h4>
|
|
|
+ <h4 data-lang="zh">染色体长度决定整体架构</h4>
|
|
|
+ <p data-lang="en">Contact probability negatively correlated...</p>
|
|
|
+ <p data-lang="zh">接触概率与基因组距离呈负相关...</p>
|
|
|
+</div>
|
|
|
+
|
|
|
+<!-- 结论条目 -->
|
|
|
+<div class="concl-item">
|
|
|
+ <div class="concl-num">1</div>
|
|
|
+ <div class="concl-text" data-lang="en"><strong>Genome size...</strong></div>
|
|
|
+ <div class="concl-text" data-lang="zh"><strong>基因组大小...</strong></div>
|
|
|
+</div>
|
|
|
+```
|
|
|
+
|
|
|
+### 无需双语的元素
|
|
|
+
|
|
|
+以下内容中英文通用,**不加** `data-lang`:
|
|
|
+- 数字/统计值(stat-box 中的 `12`、`5.75B` 等)
|
|
|
+- 物种缩写图标(`Hu`、`Mo`、`Ch`)
|
|
|
+- 图片(`<img>` 标签)
|
|
|
+- 数据表格中的数值列
|
|
|
+- DOI、GEO 编号等标识符
|
|
|
+- 作者姓名、单位名称(保持英文原文)
|
|
|
+
|
|
|
+表格表头需要双语:
|
|
|
+```html
|
|
|
+<thead>
|
|
|
+ <tr data-lang="en"><th>Species</th><th>Replicates</th><th>Genome Size</th></tr>
|
|
|
+ <tr data-lang="zh"><th>物种</th><th>重复数</th><th>基因组大小</th></tr>
|
|
|
+</thead>
|
|
|
+```
|
|
|
+
|
|
|
+### 完整 JS 切换逻辑
|
|
|
+
|
|
|
+```javascript
|
|
|
+(function(){
|
|
|
+ var btns = document.querySelectorAll('.lang-btn');
|
|
|
+ btns.forEach(function(btn){
|
|
|
+ btn.addEventListener('click', function(){
|
|
|
+ var lang = this.dataset.target;
|
|
|
+ document.querySelectorAll('[data-lang]').forEach(function(el){
|
|
|
+ el.style.display = el.dataset.lang === lang ? '' : 'none';
|
|
|
+ });
|
|
|
+ btns.forEach(function(b){ b.classList.remove('active'); });
|
|
|
+ this.classList.add('active');
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // 默认英文
|
|
|
+ document.querySelectorAll('[data-lang="zh"]').forEach(function(el){
|
|
|
+ el.style.display = 'none';
|
|
|
+ });
|
|
|
+})();
|
|
|
+```
|
|
|
+
|
|
|
+### 打印时双语处理
|
|
|
+
|
|
|
+```css
|
|
|
+@media print {
|
|
|
+ .lang-switch { display: none; }
|
|
|
+ /* 打印时显示当前选中的语言,或可改为两种都显示 */
|
|
|
+}
|
|
|
+```
|