跳转到帖子
在手机APP中查看

一个更好的浏览方法。了解更多

OKCCN - XenForo & IPS Plugin Marketplace

主屏幕上的全屏APP,带有推送通知、徽章等。

在iOS和iPadOS上安装此APP
  1. 在Safari中轻敲分享图标
  2. 滚动菜单并轻敲添加到主屏幕
  3. 轻敲右上角的添加按钮。
在安卓上安装此APP
  1. 轻敲浏览器右上角的三个点菜单 (⋮) 。
  2. 轻敲添加到主屏幕安装APP
  3. 轻敲安装进行确认。
  • 选择语言

CSS 3D Transforms

推荐的帖子

  • 行政经理

CSS 3D Transforms


CSS 3D Transforms

The CSS transform property applies a 2D or 3D transformation to an element. This property allows you to rotate, scale, move, and skew elements.

Mouse over the elements below to see the difference between a 2D and a 3D transformation:

2D rotate
3D rotate

CSS 3D Transforms Functions

With the CSS transform property you can use the following 3D transformation functions:

  • rotateX()
  • rotateY()
  • rotateZ()

The CSS rotateX() Function

The rotateX() function rotates an element around its X-axis at a given degree:

Rotate X

Example

#myDiv {
  transform: rotateX(150deg);
}
Try it Yourself »


The CSS rotateY() Function

The rotateY() function rotates an element around its Y-axis at a given degree:

Rotate Y

Example

#myDiv {
  transform: rotateY(150deg);
}
Try it Yourself »

The CSS rotateZ() Function

The rotateZ() function rotates an element around its Z-axis at a given degree:

Example

#myDiv {
  transform: rotateZ(90deg);
}
Try it Yourself »


CSS Transform Properties

The following table lists all the 3D transform properties:

Property Description
transform Applies a 2D or 3D transformation to an element
transform-origin Allows you to change the position on transformed elements
transform-style Specifies how nested elements are rendered in 3D space
perspective Specifies the perspective on how 3D elements are viewed
perspective-origin Specifies the bottom position of 3D elements
backface-visibility Defines whether or not an element should be visible when not facing the screen

CSS 3D Transform Functions

Function Description
matrix3d() Defines a 3D transformation, using a 4x4 matrix of 16 values
translate3d() Defines a 3D translation
translateZ() Defines a 3D translation, using only the value for the Z-axis
scale3d() Defines a 3D scale transformation
scaleZ() Defines a 3D scale transformation by giving a value for the Z-axis
rotate3d() Defines a 3D rotation
rotateX() Defines a 3D rotation along the X-axis
rotateY() Defines a 3D rotation along the Y-axis
rotateZ() Defines a 3D rotation along the Z-axis
perspective() Defines a perspective view for a 3D transformed element

参与讨论

你可立刻发布并稍后注册。 如果你有帐户,立刻登录发布帖子。

游客
回帖…

帐户

导航

搜索

搜索

配置浏览器推送通知

Chrome (安卓)
  1. 轻敲地址栏旁的锁形图标。
  2. 轻敲权限 → 通知。
  3. 调整你的偏好。
Chrome (台式电脑)
  1. 点击地址栏中的挂锁图标。
  2. 选择网站设置。
  3. 找到通知选项并调整你的偏好。