首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

变换盒 | transform-box

这是一种实验技术

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

transform-box属性定义了与transform以及transform-origin属性相关的布局框。

代码语言:javascript
复制
/* Keyword values */
transform-box: border-box;
transform-box: fill-box;
transform-box: view-box;

/* Global values */
transform-box: inherit;
transform-box: initial;
transform-box: unset;

Initial value

border-box

Applies to

transformable elements

Inherited

no

Media

visual

Computed value

as specified

Animation type

discrete

Canonical order

the unique non-ambiguous order defined by the formal grammar

语法

可能值

border-box——使用边框作为参考框。表的参考框是包裹着该表的边框,而不是其表框。

fill-box——使用对象边界框作为参考框。

view-box——使用最近的SVG视口作为参考框。如果viewBox属性为创建SVG视口元素指定了一个值,则参考框位于由viewBox属性建立的坐标系的原点处,并且参考框的尺寸被设置为该viewBox属性的宽度和高度值。

形式语法

代码语言:javascript
复制
border-box | fill-box | view-box

规范

Specification

Status

Comment

CSS Transforms Level 1The definition of 'transform-box' in that specification.

Working Draft

Initial definition

浏览器兼容性

Feature

Chrome

Firefox (Gecko)

Internet Explorer

Opera

Safari

Basic support

No support

55.0 (55.0)1

No support

No support

?

Feature

Android

Chrome for Android

Firefox Mobile (Gecko)

IE Mobile

Opera Mobile

Safari Mobile

Basic support

?

?

55.0 (55.0)1

?

?

?

扫码关注腾讯云开发者

领取腾讯云代金券