Bản mẫu:Cell/doc
Giao diện
Đây là một trang con tài liệu sử dụng bản mẫu dành cho Bản mẫu:Cell. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang bản mẫu gốc. |
The {{cell}} template can be used to create a table cell with a specified background color.
Usage
[sửa mã nguồn]{{cell|COLOR}}
The template takes one unnamed parameter as input, which is the background color of the table cell. The default content of each cell is a single non-breaking space with a font-size of 50%. To override the content of each cell, use a second unnamed parameter. To override the default font-size, use the style=
parameter.
- Complete specification
{{cell|Color|Text|style=Style}}
- Default
{{cell|Color| |style=font-size:50%;}}
Examples
[sửa mã nguồn]Example 1
[sửa mã nguồn]- Code
{| width="50%" cellspacing=0 {{cell|red}}{{cell|blue}}{{cell|green}} |}
- Result
Example 2
[sửa mã nguồn]- Code
{| width="50%" cellspacing=0 {{cell|red| }}{{cell|blue| }}{{cell|green| }} |}
- Result
Example 3
[sửa mã nguồn]- Code
{| width="50%" cellspacing=0 {{cell|red|R|style=text-align:center}}{{cell|blue|B|style=text-align:center}}{{cell|green|G|style=text-align:center}} |}
- Result
R | B | G |
Note
[sửa mã nguồn]The {{cell2}} and {{cell3}} templates can be used to condense a sequence of cells of the same color.
See also
[sửa mã nguồn]