如何禁用Cufon某些元素? [英] How to disable Cufon on certain elements?

查看:149
本文介绍了如何禁用Cufon某些元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用Cufon在我们的网站上有类似 Cufon.set('fontFamily','DIN Medium')。replace('h1'); 单个H1标签我想要禁用Cufon,这是不改变H1标签到任何其他标签,它必须保持原样。

I currently use Cufon accross our site with something similar to Cufon.set('fontFamily', 'DIN Medium').replace('h1'); Now for a single H1 tag i would like Cufon to be disabled, this is without changing the H1 tag to any other tag, it must remain as it is.

我可以添加类如果需要,可以做任何HTML / CSS / JS,只是不改变实际的标签。

I can add classes etc to the H1 tag if required, and can do any HTML/CSS/JS just not changing the actual tag.

任何人都知道这是可能的,如果它是如何?

Anyone know if this is possible and if it is how?

提前感谢,

Shadi

推荐答案

根据您使用的选择器引擎,您可以:

Depending on which selector engine you use, you can:


  • h1元素

  • ,您可以使用:not选择器仅将cufon应用于没有上述类的h1(使用jQuery和classname'clean',它将是 Cufon.replace('h1:not(.clean)');

  • add a class to your exception h1 element
  • you can use the :not selector to only apply cufon to the h1's that don't have the aforementioned class (with jQuery and classname 'clean' it would be something like Cufon.replace('h1:not(.clean)');

这篇关于如何禁用Cufon某些元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆