jquery 添加类,但 chrome 不呈现

标签 jquery css google-chrome

CSS代码

#id .class1 .class2 .a{max-height:20px}
.b{max-height:100px}

我使用 jquery 向具有类“a”的元素添加类“b”,但 chrome 不呈现它。 但如果我写

#id .class1 .class2 .b{max-height:100px}

chrome 会渲染它...

我只想知道为什么

最佳答案

试试这个-

.b{max-height:100px !important;}

关于jquery 添加类,但 chrome 不呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16131523/

相关文章:

jquery - 使用 jQuery 显示 SQL 表中的列标题和行

javascript - 如何将 .live() 转换为 .on()

html - 背景图像未出现在 div 中

html - Angularjs - 在单击特定链接时滚动到特定 div 位置时无法折叠特定 div

javascript - HTML CSS Footer 在定位时做了一些奇怪的事情

google-app-engine - 我怎样才能控制 WebKit 中的 Google App Engine 缓存行为(etags 变得疯狂)?

jquery - 使用 jQuery 访问以下值的最快方法

javascript - 服务器发送的事件在 Chrome 中不起作用

google-chrome - chrome 真的为每个标签创建了一个进程吗?

javascript - 使用 JS/jQuery 从 URL 中删除哈希值