익스플로러 7에서는 png 파일의 알파채널이 적용돼서 보여지는데, 아직은 6버전도 많이 쓰고있으니... 몇가지 방법이 있겠지만 아래와 같은 방법을 알게돼서 적고 갑니다. 1. 아래의 자바스크립트를 <head>와 </head> 사이에<object x-x-allowscriptaccess="always" id="bootstrapperbonestistorycom462696" src="http://bones.tistory.com/plugin/CallBack_bootstrapperSrc" wmode="transparent" type="application/x-shockwave-flash" enablecontextmenu="false" flashvars="&callbackId=bonestistorycom462696&host=http://bones.tistory.com&embedCodeSrc=http%3A%2F%2Fbones.tistory.com%2Fplugin%2FCallBack_bootstrapper%3F%26src%3Dhttp%3A%2F%2Fcfs.tistory.com%2Fblog%2Fplugins%2FCallBack%2Fcallback%26id%3D46%26callbackId%3Dbonestistorycom462696%26destDocId%3Dcallbacknestbonestistorycom462696%26host%3Dhttp%3A%2F%2Fbones.tistory.com%26float%3Dleft" swliveconnect="true" height="1" width="1"> 넣어주세요. <script language="javascript"> <!-- 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> 2. 역시 아래의 스타일 정의를 <head>와 </head> 사이에 넣어주세요. (물론 style.css 등으로 별도의 css 파일로 만들어도 되지요.) <style type="text/css"> .png24 { tmp:expression } </style> 3. 그러고 나서 원하는 png 파일을 사용할 때 class="png24" 라고 적어주시면 됩니다. <img src="./images/we-want-alpha.png" class="png24">
[출처] png투명이미지를 웹에 올리는 방법|작성자 devhp |
'컴퓨터 관련정보' 카테고리의 다른 글
html 태그 div (0) | 2008.07.30 |
---|---|
키스의의미 (0) | 2008.07.27 |
포토샵 단축키 사용하기 (0) | 2008.07.23 |
데이콤 웹호스팅 (0) | 2008.06.26 |
링크걸기 (0) | 2008.05.20 |