Is there a way to do browser specific conditional CSS inside a *.css file?

前端 未结 8 2106
借酒劲吻你
借酒劲吻你 2020-12-11 15:13

Is there a way to do browser specific conditional CSS inside a *.css file? I want to define all of the styles inside of the same physical file.

8条回答
  •  佛祖请我去吃肉
    2020-12-11 15:35

    There is a way to do it in IE by taking advantage of bugs in the browser and @import. The best method I've seen is here, courtesy of bobince (and definitely beat out my answer, heh).

    In general though, no. Even conditional comments are browser-specific to IE.

提交回复
热议问题