此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

CSSTransformComponent:toString() 方法

有限可用

此特性不属于基线,因为它尚未在主流浏览器中得到支持。

Want more support for this feature? Tell us why.

CSSTransformComponent 接口的字符串化方法 toString() 返回一个 CSS Transform 函数。

语法

js
toString()

参数

无。

返回值

CSS Transform 函数形式的字符串。

这将使用 is2D 的值来返回 2D 或 3D 转换。例如,如果组件表示 CSSRotate 并且 is2D 为 false,则返回的字符串将是 CSS 转换函数 rotate3d() 的形式表示。如果为 true,则返回的字符串将是 2D 的 rotate() 函数形式表示。

示例

待完成。

规范

规范
CSS Typed OM Level 1
# CSSTransformComponent-stringification-behavior

浏览器兼容性