四个合约页面统一添加表头
This commit is contained in:
+15
-1
@@ -52,6 +52,12 @@
|
||||
.drawer .result b { font-size: 1.1rem; }
|
||||
.drawer .close-btn { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--sub); line-height: 1; }
|
||||
.drawer .close-btn:hover { color: var(--fg); }
|
||||
|
||||
.section { margin-bottom: 8px; }
|
||||
.section h2 { font-size: 1.1rem; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; margin: 28px 0 10px; padding: 4px 0; }
|
||||
.section h2 .arrow { display: inline-block; transition: transform .2s; font-size: 0.8rem; }
|
||||
.section.collapsed h2 .arrow { transform: rotate(-90deg); }
|
||||
.section.collapsed table { display: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -62,6 +68,8 @@
|
||||
<p class="sub"><a href="index.html">返回总览</a> | <a href="fg2609.html">FG2609</a> | <a href="fg2610.html">FG2610</a> | <span>FG2611</span> | <a href="fg2701.html">FG2701</a></p>
|
||||
<p class="formula">振幅算法:近 5 日均振幅 = 过去 5 个交易日 (最高 − 最低) 的均值,结果四舍五入取整</p>
|
||||
|
||||
<div class="section" id="sec-fg2611">
|
||||
<h2 onclick="toggleSection('sec-fg2611')"><span class="arrow">▼</span> FG2611 玻璃</h2>
|
||||
<table>
|
||||
<tr><th>日期</th><th>星期</th><th>开盘</th><th>收盘</th><th>最高</th><th>最低</th><th>最高最低差价</th><th>振幅</th></tr>
|
||||
<tr><td>2026/7/1</td><td>周三</td><td>1011</td><td>1001</td><td>1011</td><td>994</td><td>17</td><td class="na">-</td></tr>
|
||||
@@ -84,6 +92,7 @@
|
||||
<tr><td>2026/7/24</td><td>周五</td><td>931</td><td>939</td><td>941</td><td>922</td><td>19</td><td class="amp-cell">19</td></tr>
|
||||
<tr><td>2026/7/27</td><td>周一</td><td class="na">-</td><td class="na">-</td><td class="na">-</td><td class="na">-</td><td>0</td><td class="amp-cell">16</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="drawer-overlay" id="overlay" onclick="closeDrawer()"></div>
|
||||
<div class="drawer" id="drawer">
|
||||
@@ -117,6 +126,10 @@ function toggleTheme() {
|
||||
} catch(e) {}
|
||||
})();
|
||||
|
||||
function toggleSection(id) {
|
||||
document.getElementById(id).classList.toggle('collapsed');
|
||||
}
|
||||
|
||||
var activeRow = null;
|
||||
function closeDrawer() {
|
||||
document.getElementById('overlay').classList.remove('show');
|
||||
@@ -129,7 +142,8 @@ document.querySelectorAll('.amp-cell').forEach(function(cell) {
|
||||
var row = cell.parentElement;
|
||||
var tbl = row.closest('table');
|
||||
var rows = tbl.querySelectorAll('tr');
|
||||
var product = 'FG2611 玻璃';
|
||||
var h2 = tbl.closest('.section').querySelector('h2');
|
||||
var product = h2.childNodes[h2.childNodes.length - 1].textContent.trim();
|
||||
|
||||
var ranges = [];
|
||||
for (var i = 1; i < rows.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user