在线文档教程
CSS
逻辑属性 | Logical Properties

偏移直列启动 | offset-inline-start

offset-inline-start

这是一种实验技术

由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。还要注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。

offset-inline-start 映射到物理取决于元素的写作模式,方向性和文本方向偏移的逻辑直列开始偏移。它对应于toprightbottom,或left属性根据为定义的值writing-modedirectiontext-orientation

/* <length> values */ offset-inline-start: 3px; offset-inline-start: 2.4em; /* <percentage>s of the width or height of the containing block */ offset-inline-start: 10%; /* Keyword value */ offset-inline-start: auto; /* Global values */ offset-inline-start: inherit; offset-inline-start: initial; offset-inline-start: unset;

它与offset-block-startoffset-block-end,和offset-inline-end定义元素的其他偏移量。

初始值auto
应用于positioned elements
是否继承no
百分比logical-width of containing block
适用媒体visual
计算值same as box offsets: top, right, bottom, left properties except that directions are logical
Animation typediscrete
规范顺序the unique non-ambiguous order defined by the formal grammar

句法

价值

offset-inline-start属性取值left

形式语法

<'left'>

HTML内容

<div> <p class="exampleText">Example text</p> </div>

CSS内容

div { background-color: yellow; width: 120px; height: 120px; } .exampleText { writing-mode: vertical-lr; position: relative; offset-inline-start: 20px; background-color: #c8c800; }

规格

SpecificationStatusComment
CSS Logical Properties Level 1The definition of 'offset-inline-start' in that specification.Editor's DraftInitial definition

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic supportNo support41.0 (41.0)1No supportNo supportNo support

FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic supportNo support41.0 (41.0)1No supportNo supportNo support