HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Canvas Object : Draw a rectangle with a shadow placed 20 pixels to the right (from the rectangle's left position)
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
shadowOffsetX | 4.0 | 9.0 | 3.6 | 4.0 | 10.1 |
The shadowOffsetX property sets or returns the horizontal distance of the shadow from the shape.
shadowOffsetX = 0 indicates that the shadow is right behind the shape.
shadowOffsetX = 20 indicates that the shadow starts 20 pixels to the right (from the shape's left position).
shadowOffsetX = -20 indicates that the shadow starts 20 pixels to the left (from the shape's left position).
Default value: | 0 |
---|---|
JavaScript syntax: | context.shadowOffsetX = number; |
Value | Description | Play it |
---|---|---|
number | A positive or negative number that defines the horizontal distance of the shadow from the shape | Play it » |
❮ Canvas Object