In-line CSS IE hack

后端 未结 7 1463
栀梦
栀梦 2020-12-30 13:33

Is it possible to create, for instance, a box model hack while using in-line CSS?

For example:

7条回答
  •  梦谈多话
    2020-12-30 14:14

    Yeah like everyone above, if you can avoid doing it inline do!! But if you really need to go inline then parser filters are probably your best bet, these are certain characters you can use on properties such as the underscore hack in ie6

    print("code sample");
    
     style="position:relative;padding:5px; _position:absolute; _padding:10px;" 
    

    ie6 will still get the underscored styles, everyone else will just ignore them!

    There is also using !important instead of underscore.

    have a play around and see what happens, but again like above, try and avoid like the plague :)

提交回复
热议问题