table
markdown中可以使用的表格
## <table>
| abc at concert pitch | abc at written pitch | |||
|---|---|---|---|---|
| Instrument | instrument=<n>/c | score=<n> | instrument=<n>/<n> | instrument=<n> |
| piccolo | instrument=c'/c | score=c' | instrument=c'/c' | instrument=c' |
| Bb clarinet | instrument=_B/c | score=_B | instrument=_B/_B | instrument=_B |
| soprano sax | instrument=_B/c | score=_B | instrument=_B/_B | instrument=_B |
| A clarinet | instrument=A/c | score=A | instrument=A/A | instrument=A |
| alto flute | instrument=G/c | score=G | instrument=G/G | instrument=G |
| cor anglais | instrument=F/c | score=F | instrument=F/F | instrument=F |
| alto sax | instrument=_E/c | score=_E | instrument=_E/_E | instrument=_E |
| double bass | instrument=C/c | score=C | instrument=C/C | instrument=C |
| tenor sax | instrument=_B,/c | score=_B, | instrument=_B,/_B, | instrument=_B, |
.na-table-wrapper
table.na-table
colgroup
col
col(span="2" style="border-left-style:solid")
thead
tr
th Instrument
th(colspan="2") abc at concert pitch
tbody
tr
td double bass
td instrument=C/c
td score=C
tfoot ... ## <div>
<colgroup> 不再有效
𝗠𝗼𝗱𝗲:
𝓘𝓸𝓷𝓲𝓪𝓷
𝓐𝓮𝓸𝓵𝓲𝓪𝓷
𝓜𝓲𝔁𝓸𝓵𝔂𝓭𝓲𝓪𝓷
𝓓𝓸𝓻𝓲𝓪𝓷
𝓟𝓱𝓻𝔂𝓰𝓲𝓪𝓷
𝓛𝔂𝓭𝓲𝓪𝓷
𝓛𝓸𝓬𝓻𝓲𝓪𝓷
𝗞𝗲𝘆 𝗦𝗶𝗴𝗻𝗮𝘁𝘂𝗿𝗲
𝙈𝙖𝙟𝙤𝙧
𝙈𝙞𝙣𝙤𝙧
7
sharps
C# A#m G#Mix D#Dor E#Phr F#Lyd B#Loc 6
sharps
F# D#m C#Mix G#Dor A#Phr BLyd E#Loc 5
sharps
B G#m F#Mix C#Dor D#Phr ELyd A#Loc 4
sharps
E C#m BMix F#Dor G#Phr ALyd D#Loc 3
sharps
A F#m EMix BDor C#Phr DLyd G#Loc 2
sharps
D Bm AMix EDor F#Phr GLyd C#Loc 1
sharp
G Em DMix ADor BPhr CLyd F#Loc 0
sharps/flats
C Am GMix DDor EPhr FLyd BLoc 1
flat
F Dm CMix GDor APhr BbLyd ELoc 2
flats
Bb Gm FMix CDor DPhr EbLyd ALoc 3
flats
Eb Cm BbMix FDor GPhr AbLyd DLoc 4
flats
Ab Fm EbMix BbDor CPhr DbLyd GLoc 5
flats
Db Bbm AbMix EbDor FPhr GbLyd CLoc 6
flats
Gb Ebm DbMix AbDor BbPhr CbLyd FLoc 7
flats
Cb Abm GbMix DbDor EbPhr FbLyd BbLoc .na-table-wrapper
.na-table
.na-table-header-group
.na-table-row
.na-table-cell ...
.na-table-row
.na-table-cell ...
.na-table-footer-group
.na-table-row
.na-table-cell ... ## .sm & .lg
.na-table.sm尺寸更小的表格.na-table.lg尺寸更大的表格
## custom style
- 全局变量
--white-space-cell表格换行, 宽高受限时经常需要设置为nowrap - 全局变量
--min-width-cell表格宽度 - 全局变量
--padding-cell表格内边距 - 全局变量
--border-cell表格边框 - 全局变量
--text-align-cell调整 表格文字默认居左
### fixed column
例如将第一列固定在左侧
td:first-child
position: sticky
left: 0
// 覆盖行的hover效果
background-color: rgb(var(--white))
// 也可以通过 `<colgroup>` 设置右边框
box-shadow: var(--box-shadow-divider-right) var(--box-shadow-divider-bottom)