# CSS: “perspective”: “0” is not valid, only values greater than “0” allowed.

> Canonical HTML version: https://rocketvalidator.com/html-validation/css-perspective-0-is-not-valid-only-values-greater-than-0-allowed
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The CSS `perspective` property does not accept `0` as a valid value. It must be either `none` or a positive length greater than zero.

The `perspective` property defines the distance between the viewer and the z=0 plane, which determines the intensity of 3D effects on child elements. A value of `0` is mathematically undefined (it would place the viewer directly on the plane), so the specification rejects it. If the goal is to remove perspective entirely, use `none`. If the goal is a very strong perspective effect, use a small positive value like `1px`.

The property applies to the element's children, not the element itself. A smaller value creates a more dramatic 3D effect, while a larger value creates a subtler one.

## Invalid example

```html
<div style="perspective: 0;">
  <div style="transform: rotateY(45deg);">Content</div>
</div>
```

## Valid examples

To disable perspective:

```html
<div style="perspective: none;">
  <div style="transform: rotateY(45deg);">Content</div>
</div>
```

To apply a strong (but valid) perspective:

```html
<div style="perspective: 1px;">
  <div style="transform: rotateY(45deg);">Content</div>
</div>
```
