---
title: shadowOffsetX
framework: webkitjs
role: symbol
role_heading: Instance Property
path: webkitjs/canvasrenderingcontext2d/1632399-shadowoffsetx
---

# shadowOffsetX

A floating-point number that controls the horizontal offset of shadows from the elements casting the shadows.

## Declaration

```data
attribute unrestricted float shadowOffsetX;
```

## Discussion

Discussion Shadows are cast shadowOffsetX pixels to the right, regardless of the canvas rotation, scale, or transformation. If shadowOffsetX is negative, shadows are cast to the left. Shadows are cast if shadowOffsetX is nonzero and the alpha value of shadowColor is nonzero.

## See Also

### Working with Shadows

- [clearShadow](webkitjs/canvasrenderingcontext2d/1634057-clearshadow.md)
- [shadowBlur](webkitjs/canvasrenderingcontext2d/1632236-shadowblur.md)
- [shadowColor](webkitjs/canvasrenderingcontext2d/1629275-shadowcolor.md)
- [shadowOffsetY](webkitjs/canvasrenderingcontext2d/1633455-shadowoffsety.md)
