Home > Web Front-end > JS Tutorial > body text

How to support the transparency effect of png images in IE and VB (vb source code packaging)_javascript skills

WBOY
Release: 2016-05-16 18:08:44
Original
1194 people have browsed it

1,使用js文件使IE支持png图片透明效果。
pngfix.js:

复制代码 代码如下:

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
function fixPNG(myImage)
{
if ((version >= 5.5) && (version < 7) && (document.body.filters))
{
var imgID = (myImage.id) ? "id='" myImage.id "' " : ""
var imgClass = (myImage.className) ? "class='" myImage.className "' " : ""
var imgTitle = (myImage.title) ?
"title='" myImage.title "' " : "title='" myImage.alt "' "
var imgStyle = "display:inline-block;" myImage.style.cssText
var strNewHTML = " " "width:" myImage.width
"px; height:" myImage.height
"px;" imgStyle ";"
"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
"(src='" myImage.src "', sizingMethod='scale');">
"
myImage.outerHTML = strNewHTML
}
}

使用方法 :
在模板的


foo
高和宽不能去掉。方法来自autoit,详细说明可以看看原文http://homepage.ntlworld.com/bobosola/index.htm

2,vb程序使用png图片,做启动画面相当帮,这里有一个vb中读取png图片的类,我以前的一个程序也是使用的这个类实现的PNG透明效果启动画面。
附件中资源来自枕善居 文件下载
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template