This question already has an answer here:
- Faded or blurred lines 2 answers
How would you draw a black line with TikZ that shades to white/transparent radially (like this) between two coordinates?
Shading is possible for rectangles (TikZ documentation, Ch. 46), though I can not define the start and end coordinate as easily as with a line.
Update: Another approach was to create such an shaded rectangle was posted here.