如何将css样式设为最高级

设置css样式时,相信你遇到过 自己想设置的那个css的优先级比自己不想用的那个css的优先级低,怎么办呢,其实很简单,加个!important就ok了

 .redFont
        {
            color:red !important;
        }

这就表示redFont这个样式的优先级为最高,但没事不建议这么做,如果以后你想改css的话 你就蛋疼了

posted @ 2013-03-05 15:52  程序有Bug  阅读(15350)  评论(0编辑  收藏  举报