IE6 transparent image Div + CSS

Source: Internet
Author: User
Tags transparent image
When using Div to support images, we found that it was good under IE7.
Not in IE6 ~~~

Later I found that there were two reasons:
1. IE6 does not support PNG format
2. You can use the filter of CSS Microsoft to solve the problem.

But the simplest way is to convert the PNG format to the GIF format.

Be sure not to be cheated by the file name ~~
I am cheated, and I have been searching for it for a long time ~~
Only real GIF formats are supported.

The first is to put the DIV in the table's TD, The bgcolor of TD = "#6d51a5", and the PNG Image in the Div. The filter works and the display is normal. It seems that this transparent PNG can be used; < Table Align = "Center" Border = "0" Cellspacing = "0" Cellpadding = "0" ID = "Table2" >
< Tr >
< TD Width = "400" Bgcolor = "#6d51a5" >
< Div ID = "Pngdiv" Style = "Width: 500; filter: progid: DXImageTransform. Microsoft. alphaimageloader (src = 'image/flower_logo_png.png ', sizingmethod = 'imag')> Image/flower_logo_png.png "Width = "133" Height = "31" > </ Div >
</ TD >
</ Tr >
  </ Table >

The second is to put the table in the DIV, and the filter will filter out the color of the DIV, so the background color of the PNG image is not; < Div Style = "Width: 500; filter: progid: DXImageTransform. Microsoft. alphaimageloader (src = 'image/flower_logo_png.png ', sizingmethod = 'image')>
<Table width =" 500 "border = "0" Align = "Center" Cellpadding = "0" Cellspacing = "0" Bgcolor = "#6d51a5" >
< Tr >
< TD Width = "400" Bgcolor = "#6d51a5" > < IMG SRC = "Image/flower_logo_png.png" Width = "133" Height = "31" > </ TD >
</ Tr >

</ Table >
  </ Div >

The third Div contains a GIF image with a serticate ~~ < Div >
  < Table Width = "500" Border = "0" Align = "Center" Cellpadding = "0" Cellspacing = "0" Bgcolor = "#6d51a5" ID = "Table1" >
< Tr >
< TD Width = "400" Bgcolor = "#6d51a5" > < IMG SRC = "Image/flower_logo_gif.gif" Width = "133" Height = "31" > </ TD >
</ Tr >
  </ Table >
  </ Div >

Some of the above content is practical, easy to use, but occasionally unavailable, strange

Only after the artist knows that the quality of the original GIF is poor than that of the PNG, but the general application should be enough.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.