Transparency
You can set transparency for each frame within an animation. Previous frames will show through the transparent area of a later frame if disposal methods are set correctly.
If the background frame is made transparent, the browser background color or pattern will show through.
Don’t be surprised if the transparent areas you specified in your original graphics are ignored when you import them into a GIF animation utility. You may need to set transparency in the animation package. Some standard transparency options include:
- None
No transparency.
- White
All the white pixels in the image will become transparent.
- Based on first pixel
The color of the “first pixel”—that is, the top-left pixel, the one at coordinates 0,0—is transparent. This is a handy option, because you’ll often have an image in the center, and the four corners will be transparent.
- Other
This option lets you select one of the palette colors as transparent.
Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.