CSS 逻辑属性与值 - CSS(层叠样式表) 编辑

CSS 逻辑属性与值CSS 的一个模块,其引入的属性与值能做从逻辑角度控制布局,而不是从物理、方向或维度来控制。

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 与 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.

参考

大小属性

外边距 、边框与内边距属性

浮动与定位属性

其他属性

已弃用属性

指南

规范

规范状态备注
CSS Logical Properties and Values Level 1Editor's DraftInitial definition.

浏览器兼容熊

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技术交流群

发布评论

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

词条统计

浏览:121 次

字数:12420

最后编辑:7年前

编辑次数:0 次

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