Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas shadowOffsetX Property

HTML canvas shadowOffsetX Property

 

 

The shadowOffsetX property is used to sets or returns the horizontal distance of the shadow from the shape.

 

For your Information:-

 

When shadowOffsetX=0, it suggests that the shadow is right behind the shape.
When shadowOffsetX=10, it suggests that the shadow starts 10 pixels to the right.
When shadowOffsetX=-10, it suggests that the shadow starts 10 pixels to the left.

 

Syntax:-

 

Its syntax is:- context.shadowOffsetX = value;

 

Further Explanation:-

 

Value Description
number A positive or negative number that defines the horizontal distance of the shadow from the shape/image

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas