الگو:Row hover highlight
(تغییرمسیر از الگو:ردیف بندی جدول)
خطای لوآ در پودمان:TNT در خط 159: افزونهٔ JsonConfig ناموجود است؛ ناتوان در بارگیری https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.
استفاده از{{row hover highlight}}
Basic usage:
Wikitext
{{row hover highlight}}
{| class=mw-datatable
|-
! 1 !! 2 !! 3
|-
| 1-1 || 2-1 || 3-1
|-
| 1-2 || 2-2 || 3-2
|}
Rendered result
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
class=mw-datatable
can be used in combination with class=wikitable
, in which case the non-header cells will have a white background.
Wikitext
{{row hover highlight}}
{| class="wikitable mw-datatable"
|-
! 1 !! 2 !! 3
|-
| 1-1 || 2-1 || 3-1
|-
| 1-2 || 2-2 || 3-2
|}
Rendered result
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
To keep the light gray background from class=wikitable
, use class=hover-highlight
:
Wikitext
{{row hover highlight}}
{| class="wikitable hover-highlight"
|-
! 1 !! 2 !! 3
|-
| 1-1 || 2-1 || 3-1
|-
| 1-2 || 2-2 || 3-2
|}
Rendered result
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |
Using {{mw-datatable}} for white background
If you want a white background for data cells, then this may be easier to remember since the template and class name are the same.
Wikitext
{{mw-datatable}}
{| class="wikitable mw-datatable"
|-
! 1 !! 2 !! 3
|-
| 1-1 || 2-1 || 3-1
|-
| 1-2 || 2-2 || 3-2
|}
Rendered result
1 | 2 | 3 |
---|---|---|
1-1 | 2-1 | 3-1 |
1-2 | 2-2 | 3-2 |