【问题标题】:Disable cufon on selected element在选定元素上禁用 cufon
【发布时间】:2011-09-02 13:35:52
【问题描述】:

有没有办法在所选 div 中的所有元素上禁用 cufon?几乎在整个页面上我都使用 cufon。但我希望一个 div 在 Arial 中。有什么办法吗?我尝试过类似 element:not(.class) 但没有任何结果。

【问题讨论】:

标签: element cufon


【解决方案1】:

更新:

我也在尝试这样做,似乎找到了解决方案!使用 jQuery 的 :not 选择器:

 Cufon.replace('h1, h2:not(.question), .pageheader', { 
 color: '-linear-gradient(white, #777777)', 
 fontFamily: 'Unisans', 
 textShadow: '-2px 2px rgba(0,0,0,1)' }); 

这至少从 Firefox、Safari、Chrome 和 IE 中的 cufon 替换中排除了 h2.question 类。 :)

【讨论】:

  • @Jednoduchy,我错过了您说您之前尝试过我的解决方案但没有结果:(“我尝试过类似 element:not(.class)”)。你具体尝试了什么?当我在 :not() 括号内添加双引号和单引号时,我没有任何运气,但删除它们解决了我的问题。
猜你喜欢
  • 2011-02-13
  • 2018-04-28
  • 2013-02-17
  • 1970-01-01
  • 1970-01-01
  • 2011-03-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多