Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions content/css/concepts/transform-functions/terms/rotateY/rotateY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
Title: 'rotateY()'
Description: 'Rotates an element around the Y-axis in 3D space.'
Subjects:
- 'Web Development'
- 'Web Design'
Tags:
- 'CSS'
- '3D Transforms'
- 'Animations'
CatalogContent:
- 'learn-css'
- '3d-transforms'
- 'css-transforms'
- 'transform-functions'
---

The `rotateY()` function is a CSS transform function that allows you to rotate an element around the Y-axis (the vertical axis) in 3D space. This function is particularly useful for creating 3D effects and animations on web pages.

## Syntax

```css
transform: rotateY(angle);
```

**Parameters:**

- `angle`: The angle of rotation, which can be specified in degrees (deg) or radians (rad). Positive values rotate the element clockwise, while negative values rotate it counterclockwise.

## Example

```css
.box {
transform: rotateY(45deg);}
```

In this example, the element with the class `box` will be rotated 45 degrees around the Y-axis.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create and attach a gif and image to showcase what the above code block does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dakshdeepHERE

Requesting a bit more time on this portion. Trying to produce the right image. Need a little tweaking of the codes. Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dakshdeepHERE

need your help. Is there a quick reference that I can consult? Thanks much.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dakshdeepHERE

need your help. Is there a quick reference that I can consult? Thanks much.

Hey @arisdelacruz, you can run the code on vs code, and attach the output image in the entry, that's all is required

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mamtawardhani THANK YOU


> **Note:**

The `rotateY` function is supported in all modern browsers, but it's always a good idea to check for compatibility if you're targeting older browsers.

Loading