Fix PNG Transparent on IE แบบตรงๆ

จะว่าไปมี script หรือcss ที่ include แล้วใช้งานง่ายดูตามลิงค์ด้านล่าง

http://jquery.khurshid.com/ifixpng.php

http://koivi.com/ie-png-transparency/

http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/

แต่บางงาน โค้ด javascript ไปตีกับ fix-png ที่เรา include มาใส่ (โอกาสน้อย ยกเว้นซวยอย่างผม T_T…)

ก็เลยจำเป็นต้อง fix แบบรูปต่อรูปตามโค้ดด้านล่างเด้อ

<span style="width:247;height:216px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='test.png');">

<img style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="test.png" width="247" height="216" border="0" >

</span>

จากโค้ดจะมี แท็ก span ครอบ แท็ก img อีกที และมีการกำหนด Attributes ต่างๆ อาจจะยาว แต่จุดหลักที่ต้องกำหนดนั่นก็คือ

width,height และ พาธรูป ซึ่งต้องกำหนดทั้ง แท็ก span และแท็ก img ให้ตรงกัน

ตย. http://www.memo8.com/lab/css/png/fix-png1.html

You can leave a response, or trackback from your own site. Responses are currently closed, but you can trackback from your own site. You can skip to the end and leave a response. Pinging is currently not allowed. Both comments and pings are currently closed.
Powered by WordPress | Shop Free T-Mobile Phones Online | Thanks to Verizon Phones without Contract, MMORPG Games and Sell Car