本文的技巧在于使用Photoshop保存图像时候的“杂边”选项,我们给图片“定义颜色以混合透明像素”就可以很好地解决透明背景图片的锯齿边缘问题。



这是photoshop中的透明区域的演示
在保存的时候,有个选项,叫“杂边”的,如果把鼠标放到其上方,会出现说明:“定义颜色以混合透明像素”。在那里设置一下颜色,就可以比较好地解决这个问题,如图:

一般只要把这里的颜色设置成跟网页的背景颜色相同或相近,然后把这个图片放到网页里,就不会察觉到有锯齿。
比如最初那张幅透明gif图片,如果在保存的时候设置“杂边”为#F2F3F7(或者是用“我的配色”中的“其他颜色”,算我没说),然后保存,之后贴到这里,就不会有锯齿了,看!
