How to do a Chrome/Opera specific stylesheet?

前端 未结 6 643
野性不改
野性不改 2020-12-07 23:26

I need to do chrome/opera hacks because of a font replacement script wanted by the client that breaks things... this is sad but everything is working in IE6

6条回答
  •  失恋的感觉
    2020-12-07 23:55

    Avoid CSS hacks. They will break.

    Google Chrome:

    @media not all and (-webkit-min-device-pixel-ratio:0)
    {  
        #example
        {
            width: 200px;
        }
    }
    

    Safari:

    @media screen and (-webkit-min-device-pixel-ratio:0)
    {
        #example
        {
            width: 200px;
        }
    }
    

    Opera:

    @media not screen and (1)
    {
        #example
        {
            width: 200px;
        }
    }
    

    Make CSS apply only for Opera 11?

    How to make CSS visible only for Opera

    Future proof CSS hack for LTE Opera 10

提交回复
热议问题