直列大小 | inline-size (Logical Properties) - CSS 中文开发手册
这是一种实验技术
由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。还要注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。
inline-size属性定义一个元素的块的水平或垂直尺寸,这取决于它的写入模式。其对应于任一width或height属性,这取决于的值writing-mode。
/* <length> values */ inline-size: 300px; inline-size: 25em; /* <percentage> values */ inline-size: 75%; /* Keyword values */ inline-size: 25em border-box; inline-size: 75% content-box; inline-size: max-content; inline-size: min-content; inline-size: available; inline-size: fit-content; inline-size: auto; /* Global values */ inline-size: inherit; inline-size: initial; inline-size: unset;
如果写作模式是垂直定向的,则inline-size与元素的高度有关;否则,则与元素的宽度有关。相关财产是block-size,它定义元素的其他维度。
初始值 | auto |
---|---|
应用于 | same as width and height |
是否继承 | no |
百分比 | inline-size of containing block |
适用媒体 | visual |
计算值 | same as width and height |
Animation type | discrete |
规范顺序 | the unique non-ambiguous order defined by the formal grammar |
inline-size属性取值为width和height
<‘width‘>
<p class="exampleText">Example text</p>
.exampleText { writing-mode: vertical-rl; background-color: yellow; inline-size: 110px; }
Specification | Status | Comment |
---|---|---|
CSS Logical Properties Level 1The definition of ‘inline-size‘ in that specification. | Editor‘s Draft | Initial definition |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | No support | 41.0 (41.0)1 | No support | No support | No support |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | No support | 41.0 (41.0)1 | No support | No support | No support |
直列大小 | inline-size (Logical Properties) - CSS 中文开发手册 - Break易站
原文:https://www.cnblogs.com/breakyizhan/p/13222210.html