Phaser API Documentation

  Version: 

Member of: Phaser.Structs.Size

setCSS(element)

Description:

Sets the values of this Size component to the element.style.width and height properties of the given DOM Element. The properties are set as px values.

Parameters:

name type description
element HTMLElement

The DOM Element to set the CSS style on.

Examples:
Since: 3.17.0
Source: src/structs/Size.js (Line 610)