模板:Scrolling table doc

来自戏曲百科

这组模板 ({{Scrolling table/top}}, {{Scrolling table/mid}}, {{Scrolling table/end}}) 允许生成比屏幕宽时水平滚动的表格。这在比较表中特别有用。 一些注意事项:

  • 仅当表格实际上比页面宽时才会出现滚动条。
  • 为方便起见, 此模板最多允许将 30 个行标题作为参数传递给其子模板。{{Scrolling table/top}}

Usage example

The following code:

{{Scrolling table/top |first = top header 1
 |left header 1
 |left header 2
 |...
 |left header 30
}}
|-
!left header 31 (extra)
{{Scrolling table/mid}}
|-
! top header 2 !! top header 3 !! top header 4 !! top header 5 !! top header 6 !! top header 7 !! top header 8 !! top header 9 !! top header 10 !! top header 11 !! top header 12 !! top header 13 !! top header 14 !! top header 15 !! top header 16 !! top header 17 !! top header 18 !! top header 19 !! top header 20
|-
| Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum
|-
| Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum
|-
| ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ... || ...
|-
| Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum
|-
| Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum || Lorem ipsum
{{Scrolling table/end}}

produces the table below:

top header 1
left header 1​
left header 2​
...​
left header 30
left header 31 (extra)
top header 2 top header 3 top header 4 top header 5 top header 6 top header 7 top header 8 top header 9 top header 10 top header 11 top header 12 top header 13 top header 14 top header 15 top header 16 top header 17 top header 18 top header 19 top header 20
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum
Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum