禁用 CSS 规则 [英] Disabling CSS rules
问题描述
有什么办法可以禁用 CSS 规则吗?
Is there any way to disable a CSS rule?
我问是因为我使用的是 Kendo UI,他们的规则非常无所不包,例如:
I ask because I am using Kendo UI, and their rules are very all-encompassing, eg:
.k-grid td
{
// styles
}
然而,如果我把我的桌子放在他们的桌子里,它的样式也会类似,所以它的影响太大了,需要移除/更换.我不想手动覆盖规则并跟上剑道的任何更改.我也不想每次更新剑道文件时都手动删除它.
However if I put my table inside their table it will be styled up similarly, so its affecting far too much and needs to be removed/replaced. I don't want to have to manually overwrite the rules and keep up to date with any of kendo's changes. I don't want to have to manually delete it every time I update kendo files either.
有没有容易解决的机会?谢谢
Any chance of an easy fix? Thanks
推荐答案
不幸的是,除了覆盖规则定义的所有内容外,没有更好的方法可以为与该规则匹配的元素禁用 CSS 规则.
Unfortunately there is no better way to disable a CSS rule for an element that is matched by that rule except by overwriting everything the rule defines.
这篇关于禁用 CSS 规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!