CSS Logical Properties and Values - CSS: Cascading Style Sheets 编辑

CSS Logical Properties and Values is a module of CSS introducing logical properties and values that provide the ability to control layout through logical, rather than physical, direction and dimension mappings.

The module also defines logical properties and values for properties previously defined in CSS 2.1. Logical properties define direction‐relative equivalents of their corresponding physical properties.

Block vs. inline

Logical properties and values use the abstract terms block and inline to describe the direction in which they flow. The physical meaning of these terms depends on the writing mode.

Block dimension
The dimension perpendicular to the flow of text within a line, i.e., the vertical dimension in horizontal writing modes, and the horizontal dimension in vertical writing modes. For standard English text, it is the vertical dimension.
Inline dimension
The dimension parallel to the flow of text within a line, i.e., the horizontal dimension in horizontal writing modes, and the vertical dimension in vertical writing modes. For standard English text, it is the horizontal dimension.

Reference

Properties for sizing

Properties for margins, borders and padding

Properties for floating and positioning

Other properties

Deprecated properties

  • offset-block-end This API has not been standardized. This deprecated API should no longer be used, but will probably still work. (now inset-block-end This is an experimental API that should not be used in production code.)
  • offset-block-start This API has not been standardized. This deprecated API should no longer be used, but will probably still work. (now inset-block-start This is an experimental API that should not be used in production code.)
  • offset-inline-end This API has not been standardized. This deprecated API should no longer be used, but will probably still work. (now inset-inline-end This is an experimental API that should not be used in production code.)
  • offset-inline-start This API has not been standardized. This deprecated API should no longer be used, but will probably still work. (now inset-inline-start This is an experimental API that should not be used in production code.)

Guides

Specifications

SpecificationStatusComment
CSS Logical Properties and Values Level 1Editor's DraftInitial definition.

Browser compatibility

In general:

  • Firefox has support for the mapped properties — where there is a direct mapping from the physical to the logical version.
  • Chrome, from version 69, has support for the mapped properties.
  • Edge, from version 79, has the same support as Chrome.
  • Firefox 66 introduces support for two value shorthands, also behind a flag in Chrome.
  • Internet Explorer has no support.

See the individual property pages for full compatibility information.

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

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

发布评论

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

词条统计

浏览:71 次

字数:21685

最后编辑:6 年前

编辑次数:0 次

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