执行完代码后发现写在样式表中的hover效果失效,改了好几遍差点从新写函数,后来发现很简单,是优先级的问题,css()中的内容覆盖了以前的样式css
只须要在样式后写!important便可解决!函数
1 .filters-wrap li:hover { 2 background:#0085d7 !important; 3 } 4 .filters-wrap li:hover span { 5 color:white !important; 6 }
执行完代码后发现写在样式表中的hover效果失效,改了好几遍差点从新写函数,后来发现很简单,是优先级的问题,css()中的内容覆盖了以前的样式css
只须要在样式后写!important便可解决!函数
1 .filters-wrap li:hover { 2 background:#0085d7 !important; 3 } 4 .filters-wrap li:hover span { 5 color:white !important; 6 }