Png24 formatted picture when adding display hidden animation with jquery, the translucent area of the picture appears black-edged?
Search on the Internet mainly has the following methods:
1, save the picture to PNG-8 format.
2. Cut the background color together and save it in JPG format.
The above two methods I tried, as if the effect is not good PNG8 format will still have black edge.
Workaround:
1, do not directly change the transparency of the picture, but to the picture set a container, to modify the transparency of the container 2, to this container to add a color similar background color (very important, the key to solve the bug in this step,)
In general, this bug is resolved, if you still have a problem, see below:
3. Add a zoom:1 to the container
(personally think this method is only a camouflage, not fundamentally solve the problem, it seems to be the only way, look forward to a better way)
IE8 The black edge problem when jquery changes the transparency of PNG images