专注于WEB前端开发, 追求更好的用户体验, 更好的开发体验 [长沙前端QQ群:234746733]

2008年7月

  • 又发现了点css hack的写法

    / 分类: 开发 / No Comments

     之前在这里:https://xhl.me//archives/534总结了一次,这次加上点。

    CSS代码
    1. 这个是基本大家都知道的:   
    2. test{margin:1px!important;margin:2px}   
    3. firefox/IE7 -> 1px  
    4. IE6 -> 2px  
    5.   
    6. 下面两个是新发现的(这里不考虑IE5了,最值得看的就是第三个):   
    7. test{margin:1px;+margin:2px}   
    8. firefox ->1px  
    9. IE6/IE7 ->2px 
    10.   
    11. test{margin:4px!important;>margin:3px!important;margin:2px;}   
    12. firefox -> 4px  
    13. IE7 -> 3px  
    14. IE6 -> 2px