CSS Transparent Border Problem In Firefox 4?

前端 未结 2 1334
南旧
南旧 2020-12-30 03:08

I\'m trying to create a pure CSS triangle for a tooltip. All browsers looks fine except for the latest Firefox 4. Here\'s the code:


<         


        
相关标签:
2条回答
  • 2020-12-30 03:44

    Okay I could see the problem, and found out that if you change the border style to "outset" if will be fixed in FF4, and works in IE9 too.

    That would give you something like this:

    .arrow {
         border:50px outset transparent ;
         border-top:#eee 50px solid;
         display:block;
         height:0;
         width:0;
         top:50%;
         right:50%;
         position:absolute;
    }
    

    PS. I'm on Vista with the newest firefox stable.

    Here is the jsFiddle: http://jsfiddle.net/UFSpd/1/

    0 讨论(0)
  • 2020-12-30 03:56

    if transparent is not work for you then use rgba may be that's work.

    Write:

    .arrow {
        border-color:#eee rgba(255,255,255,0)  rgba(255,255,255,0)  rgba(255,255,255,0);
    } 
    
    0 讨论(0)
提交回复
热议问题