<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "content-type" content = "text/html; charset = gb2312"/>
<Title> png background transparency in ie6 </title>
<Style>
. Bg {
Height: 288px;
Width: 512px;
Filter: progid: dximagetransform. microsoft. alphaimageloader (enabled = true, sizingmethod = scale, src = "yun_qi_img/title.png ");
Background-repeat: repeat;
}
</Style>
</Head>
<Body>
<Div class = "bg"> fdsf </div>
</Body>
</Html>
Syntax:
Filter: progid: dximagetransform. microsoft. alphaimageloader (enabled = benabled, sizingmethod = ssize, src = surl)
If you want to use png for background transparency, you need to use the css tutorial filter and hack:
Html> body. png {background: url(1.png); width: 300px; height: 100px; border: #000 solid 1px ;}
/* Ie6 */* html. png {filter: progid: dximagetransform. microsoft. alphaimageloader (enabled = true, sizingmethod = scale, src1_'1.png ');
Background: none; width: 300px; height: 100px; border: #000 solid 1px ;}