# [name]

[name] can be used to apply hierarchical 3D transformations to DOM elements via the CSS3 [link:https://www.w3schools.com/cssref/css3_pr_transform.asp transform] property. This renderer is particularly interesting if you want to apply 3D effects to a website without canvas based rendering. It can also be used in order to combine DOM elements with WebGL content.
There are, however, some important limitations:

- It's not possible to use the material system of *three.js*.
- It's also not possible to use geometries.
- `[name]` only supports 100% browser and display zoom.

So `[name]` is just focused on ordinary DOM elements. These elements are wrapped into special objects (`CSS3DObject` or `CSS3DSprite`) and then added to the scene graph.

## Import

[name] is an add-on, and must be imported explicitly. See [link:#manual/introduction/Installation Installation / Addons].

`import { CSS3DRenderer } from 'three/addons/renderers/CSS3DRenderer.js';`

## Examples

[example:css3d_molecules molecules]
[example:css3d_orthographic orthographic camera]
[example:css3d_periodictable periodictable]
[example:css3d_sprites sprites]

## Constructor

### [name]( [param:Object parameters] )

[page:DOMElement element] - A [link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement HTMLElement] where the renderer appends its child-elements. This corresponds to the [page:CSS3DRenderer.domElement domElement] property below. If not passed in here, a new div element will be created.

## Properties

### [property:DOMElement domElement]

A [link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement HTMLElement] where the renderer appends its child-elements.
This is automatically created by the renderer in the constructor (if not provided already).

## Methods

### [method:Object getSize]()

Returns an object containing the width and height of the renderer.

### [method:undefined render]( [param:Scene scene], [param:PerspectiveCamera camera] )

Renders a [page:Scene scene] using a [page:PerspectiveCamera perspective camera].

### [method:undefined setSize]([param:Number width], [param:Number height])

Resizes the renderer to (width, height).

## Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS3DRenderer.js examples/jsm/renderers/CSS3DRenderer.js]