HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

transform-origin

Description

The transform-origin property for CSS specifies the origin for the transform.

Syntax

CSS

transform-origin: value;

JS

object.style.transformOrigin = "value";

Values

<'transform-origin'> = [ left | center | right | top | bottom | <length-percentage> ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ] <length>? | [[ center | left | right ] && [ center | top | bottom ]] <length>?
left

Left.

center

Center.

right

Right.

top

Top.

bottom

Bottom.

<length-percentage> =
    <length> |
    <percentage>
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

<length>

Specifies the length using a number followed by a unit of measurement.

Initial

50% 50%

Examples

1 · bottom

2 · center

3 · left

4 · length

5 · percentage

6 · right

7 · top

8 · JS