아래 코딩 조건은 페이지에 png이미지 경로를 보여져야 하고
main.css 에서 background로 하지않는 경우에 사용되는 방법임..
main.css====================================================
<style>
/*png 투명하게 하기 ie6*/
.png24 {tmp:expression(setPng24(this));}
.couponLayer02_CstmRe { position:relative; display:; width:224px; height:98px; border:0px solid red;}
.couponLayer02_CstmRe img { border:0;}
.couponLayer02_Cstm { position:absolute;}
.couponLayer02_CstmClose {position:absolute; left:200px; top:10px; width:auto height: 14px;height: 18px;}
</style>
ie7부터는 아래와 같이 페이지에 스크립트를 넣지 않아도 투명이 됨
ie6에서 png 투명이 안됨
<html>==========================================================
<head>
<link href="main.css" rel="stylesheet" type="text/css"> <!-- main.css 링크 -->
<script type="text/javascript">
//ie6에서 png투명하게 하기
function setPng24(obj) {
obj.width=obj.height=1;
obj.className=obj.className.replace(/\bpng24\b/i,'');
obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
obj.src='';
return '';
}
</script>
</head>
<body>
<div id="nCstmLay" class="couponLayer02_CstmRe">
<div class="couponLayer02_Cstm">
<a href="http://book.interpark.com/event/EventPremiumNewApplicant.do?_method=NewMemberEventMain" target="_blank">
<img class="png24" src="
0 개의 댓글:
댓글 쓰기