Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 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,41 @@
---
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use H2 for syntax


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

### Parameters
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to use h3 for parameters instead you can write it like:

**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
Copy link
Collaborator

Choose a reason for hiding this comment

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

This have to be h2


```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?


### Browser Compatibility
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for a separate header for this instead use the note feature like:

> **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