Template:Td
来自Valve Developer Community
跳转到导航
跳转到搜索
文档页面 Template:Td/doc/zh 不存在。
模板将改为显示英文文档。如果此消息后没有任何内容,则很可能该文档甚至不存在英文版本。
模板将改为显示英文文档。如果此消息后没有任何内容,则很可能该文档甚至不存在英文版本。
A data cell of an HTML table with a prepared style.
Parameters and Examples
| Parameter | Description | Example |
|---|---|---|
{{{1}}} or {{{text}}}
|
Your text. | {{td|Hello, World!}} {{td|text = Hello, World!}} |
Attributes | ||
{{{id}}}
|
Element ID. Useful for linking to a specific part of the page. | {{td|id = my_id}} [[My Sweet Page#my_id|My sweet page]] |
{{{class}}}
|
Custom HTML class. | {{td|class = myClass}} |
{{{colspan}}}
|
Specifies values for the HTML attribute colspan.
|
{{td|colspan = 2}} |
{{{rowspan}}}
|
Specifies values for the rowspan HTML attribute.
|
{{td|rowspan = 4}} |
{{{style}}}
|
Custom CSS (prepared styles are also planned). | {{td|style = background-image:linear-gradient(0deg, white, black)}} |
Style | ||
{{{width}}}
|
The width of the cell. | {{td|width = 30%}} |
{{{bgcolor}}}
|
Background color. | {{td|bgcolor = rgb(255 255 255)}} |
{{{dark}}}
|
Dark version of the background color.
{{{bgcolor}}} and does not allow you to specify a custom background color. |
{{td|dark = true}} |
{{{radius}}}
|
The radius of the cell border. | {{td|radius = 8px 2px 4px 8px}} |
{{{select}}}
|
Specifies the value for the CSS property user-select.
|
{{td|select = all}} |
{{{align}}}
|
Text alignment. | {{td|align = right}} |
{{{font-size}}}
|
Font size. | {{td|font-size = 1.5em}} |
{{{color}}}
|
Text color. | {{td|color = #893GVS}} |