Hausa:attribute na perspective-origin na CSS

Definition and usage

The perspective-origin attribute defines the X-axis and Y-axis on which the 3D element is based. This attribute allows you to change the bottom position of the 3D element.

When the perspective-origin attribute is defined for an element, its child elements will receive the perspective effect, not the element itself.

note:This attribute must be used with perspective attributes used together, and only affect 3D transformation elements.

see also:

CSS3 tutorial:Hausa CSS3 3D transformation

HTML DOM reference manual:perspectiveOrigin attribute

example

set the base position of the 3D element:

div
{
perspective:150;
perspective-origin: 10% 10%;
}

try it yourself

CSS grammar

perspective-origin: x-axis y-axis;

attribute value

value description
x-axis

define the position of the view on the x-axis. Default value: 50%.

possible values:

  • left
  • center
  • right
  • length
  • %
y-axis

define the position of the view on the y-axis. Default value: 50%.

possible values:

  • top
  • center
  • bottom
  • length
  • %

technical details

default value: 50% 50%
inheritance: no
version: CSS3
JavaScript grammar: object.style.perspectiveOrigin="10% 10%"

browser support

tabbin din tsarin dake na yauwan da aiki na tsarin dake

Hausa Chrome Hausa IE / Edge Hausa Firefox Hausa Safari Hausa Opera
36.0
12.0 -webkit-
10.0 16.0
10.0 -moz-
9.0
4.0.3 -webkit-
23.0
15.0 -webkit-