模板:Static row numbers
外觀
| 本模板使用以下模板樣式: |
給表格添加橫欄號。
例子
[編輯]代碼:
{{static row numbers}}
{| class="wikitable sortable static-row-numbers"
|-
! rowspan="2" | 颜色
! colspan="3" | 资料
|- class="static-row-header"
! 甲 !! 乙 !! 丙
|-
| 品红 || 1 || 2 || 3
|-
| 黄 || 4 || 5 || 6
|-
| 青 || 7 || 8 || 9
|- class="sortbottom static-row-header"
| '''合计''' || 12 || 15 || 18
|- class="sortbottom static-row-header"
| '''均值''' || 4 || 5 || 6
|}
效果:
| 顏色 | 資料 | ||
|---|---|---|---|
| 甲 | 乙 | 丙 | |
| 品紅 | 1 | 2 | 3 |
| 黃 | 4 | 5 | 6 |
| 青 | 7 | 8 | 9 |
| 合計 | 12 | 15 | 18 |
| 均值 | 4 | 5 | 6 |
參見
[編輯]更多調整表格效果模板樣式:
- {{Column style}}
- {{sticky header}} - 滾動瀏覽表格數據時,將欄標題凍結到頁頂。
- {{sticky table start}} - 在滾動區域內凍結行列。
- {{sort under}} - 將排序箭頭移到表頭文字下方。
- {{row hover highlight}} - 凸顯滑鼠懸停的橫欄,亦支持換用白色底色。
- {{table nowrap}} -將某縱欄設定為不換行。
- {{table alignment}} - 指定特定縱欄的對齊方式
- {{table vertical alignment}} - 同上,但設定垂直對齊。
- {{shy}} - 可通過在單詞中添加軟連字元,使其能夠換行,讓列寬縮窄。