关于ie6中使用css滤镜后链接无法点击的问题

709 views

网上最大众华的解决ie6无法显示png背景图片透明问题的方法就是用

“filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src=’images/liBack.png’,no-repeat); background:none;”。

用了上面那句话会导致链接无法点击,所以需给链接加个positon:relative。

如下所示:

#nav li {
width:130px;
text-align:center;
height:40px;
background:url(../images/liBack.png) no-repeat center;
line-height:40px;
font-family:’宋体’, Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:bold;
float:left;
}

* html #nav li{
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src=’images/liBack.png’,no-repeat); background:none; }

#nav li a{
position:relative;
}

Category 经验记录 Tagged , , , , , Trackbacks are closed, but you can post a comment.

7 Comments

  1. Posted 2009年09月15日 at 20:59 | Permalink

    很多人都放弃IE6了哦
    不过这个还是很实用的,

    [回复]

    admin Reply:

    @小Q, 关键是现在还有很多人在用ie6啊,所以还是得考虑他们啊

    [回复]

  2. Posted 2009年09月15日 at 22:08 | Permalink

    多么无奈的事情啊!

    [回复]

    admin Reply:

    @Louis Han, 是啊,调试ie6简直是痛苦

    [回复]

  3. Posted 2009年09月15日 at 23:04 | Permalink

    又有个方法了,哈哈

    [回复]

  4. Posted 2009年09月15日 at 23:07 | Permalink

    这样的话对连接多的页面就麻烦了

    [回复]

    admin Reply:

    @Hobo, 有啥高招么?

    [回复]

    Hobo Reply:

    @admin, 哈哈我的帖子,试试不用你那个方法做http://www.nethobo.com/2009/09/12/two-ways-to-solve-the-png-transparent-background-in-ie-not-displayed-properly-under-the-question-of/

    [回复]

    admin Reply:

    @Hobo, 我用过你这方法,不知道怎么搞的,没有效果

    [回复]

  5. Posted 2009年09月16日 at 07:49 | Permalink

    以前就遇到这个问题的。。不过现在已经放弃IE6了。。现在用的是IE8+FF..

    [回复]

    admin Reply:

    @阿东, 有些情况下做出来的东西必须得兼容ie6啊,没办法

    [回复]

  6. Posted 2009年09月16日 at 16:37 | Permalink

    搜藏了 以后用的到

    [回复]

    admin Reply:

    @雅丹地貌, 知识就是积累起来的

    [回复]

  7. Posted 2009年09月16日 at 21:52 | Permalink

    好方法,留着以后用,呵呵。

    [回复]

    admin Reply:

    @太阳博客, 您网页设计也会啊,越来越佩服您老啦

    [回复]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>