1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

The easiest way to PNG support in IE6

Discussion in '前端开发' started by fen, Dec 22, 2006.

  1. fen

    fen New Member

    Joined:
    Dec 18, 2005
    Messages:
    3,050
    Likes Received:
    25
    Form http://blog.bjorkoy.com/2006/12/12/flawless-and-fast-png-support-in-ie6/

    This must be the easiest way to get full support for PNG-transparency in Internet Explorer 6. The technique even works for PNG-transparency in CSS backgrounds. Credit goes to
    Angus Turnbull
    for creating this workaround. My hat is thoroughly tipped.
    Here’s what you do
    First, put
    this file
    in your CSS directory.
    Second, paste this code into your CSS file:
    Enjoy! Really, that’s it.
    Transparent backgrounds
    As I said, this can be used to make transparent PNGs work on CSS backgrounds as well. Say you have this code:
    All you have to do is apply the background behavior to the #header element:
    You can do this with every element you’re using PNG-transparency on:
    The asterisk also works, but I don’t know what it does to rendering time:
    I found this via the Apple site, which demonstrates some beautiful use of transparency, for example on the
    Mac Pro site
    (the tower picture), and the
    Leopard Spotlight Preview page
    (the big Spotlight icon).
    Here’s all the details from Angus himself.
     
  2. fen

    fen New Member

    Joined:
    Dec 18, 2005
    Messages:
    3,050
    Likes Received:
    25
    这么经典的文章怎么没人顶:mummy:
     
  3. OUYANG

    OUYANG New Member

    Joined:
    Sep 6, 2005
    Messages:
    3,025
    Likes Received:
    5
    对鸟语向来不感冒