<display-internal> - CSS: Cascading Style Sheets 编辑

Some layout models such as table and ruby have a complex internal structure, with several different roles that their children and descendants can fill. This page defines those "internal" display values, which only have meaning within that particular layout mode.

Syntax

Valid <display-internal> values:

table-row-group
These elements behave like <tbody> HTML elements.
table-header-group
These elements behave like <thead> HTML elements.
table-footer-group
These elements behave like <tfoot> HTML elements.
table-row
These elements behave like <tr> HTML elements.
table-cell
These elements behave like <td> HTML elements.
table-column-group
These elements behave like <colgroup> HTML elements.
table-column
These elements behave like <col> HTML elements.
table-caption
These elements behave like <caption> HTML elements.
ruby-base This is an experimental API that should not be used in production code.
These elements behave like <rb> HTML elements.
ruby-text This is an experimental API that should not be used in production code.
These elements behave like <rt> HTML elements.
ruby-base-container This is an experimental API that should not be used in production code.
These elements behave like <rbc> HTML elements generated as anonymous boxes.
ruby-text-container This is an experimental API that should not be used in production code.
These elements behave like <rtc> HTML elements.

Examples

CSS tables example

The following example demonstrates laying out a simple form using CSS table layout.

HTML

<main>
  <div>
    <label for="name">Name</label>
    <input type="text" id="name" name="name">
  </div>
  <div>
    <label for="age">Age</label>
    <input type="text" id="age" name="age">
  </div>
</main>

CSS

main {
  display: table;
}

div {
  display: table-row;
}

label, input {
  display: table-cell;
  margin: 5px;
}

Result

Specifications

SpecificationStatus
CSS Display Module Level 3
The definition of 'display-internal' in that specification.
Candidate Recommendation

Browser compatibility

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

Support of table values

BCD tables only load in the browser

table, table-cell, table-column, table-column-group, table-footer-group, table-header-group, table-row, and table-row-group

Support of ruby values

BCD tables only load in the browser

ruby, ruby-base, ruby-base-container, ruby-text, and ruby-text-container

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:126 次

字数:7892

最后编辑:8年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文