IE也能用样式表轻松过滤广告

一、新建一个ad.css文件,用记事本打开,填入以下内容
<pre class=”brush:css”>/* verycd */

iframe[src^=”http://sponsor.verycd.com”],

.warp-notice .warp-notice2,

/* allyes */

*[src*=”allyes.cn”],

*[src*=”allyes.com”],

/* adsame */

*[src*=”adsame.com”],

/* cntv */

div[id^=”iDNA_cou_”],

#remotecontrol.remotecontrol,

.head_adv,

.cntvhp_head .search,

.cntvhp_body .adbox,

embed[src^=”http://www.cctv.com/nettv/Library/tongyong/ad/jshow.swf?”],

.advertis#adver,

#ssFlashPlayDiv #ssflashID,

.ADtitle_list,

.logobar DIV[class^=”wrap_i”] .searcharea,

iframe[src*=”a.cntv.cn”],

/* 酷6 */

iframe[src*=”ku6afp.allyes.com”],

/* 优酷 */

object[data^=”http://static.atm.youku.com/”],

img[src^=”http://static.atm.youku.com/”],

iframe[src^=”http://cpro.baidu.com/cpro/ui/uijs.php?”],

iframe[src^=”http://smarttrade.allyes.com”],

/* 绿盟 */

iframe[src*=”www.xdowns.com/gg/”],

#baidugg,

a[href^=”http://www.moneywise.com.cn/Download/download.aspx?”],

/* 绿色下载站 */

#greendown *[class^=”content ad-“],

#greendown *[class^=”ad-“],

#greendown *[src*=”/ggao/”],

#greendown iframe[src=”/js/comment_g.html”],

/* 17173 */

object[id^=”hengtong”],

a[href^=”http://sohu.ad-plus.cn”],

*[id^=”i2IFEP_”],

.banner960120,

.banner750120,

.banner740120,

.wrapper .bannerTextNew,

/* 阿里妈妈 */

*[src*=”z.alimama.com”],

*[src*=”a.alimama.cn”],

/* doubleclick */

*[src*=”doubleclick.net”],

/* Google广告 */

*[src*=”pagead2.googlesyndication.com”],

*[src*=”www.google-analytics.com”],

*[src*=”googleadsserving.cn”],

*[src*=”partner.googleadservices.com”],

/* 搜狐 */

sohuadcode,

/* 中关村 */

#hq_float,

*[id^=”Bar16″],

#Float1265,

.word_ad,

.banner760_1,

.pic_ad,

.banner760 .adSpace,

/* discuz论坛 */

.content #hot,

.content #modarea,

.content #ann,

.subject em,

.subject .attach,

.subject .new,

.threadtags,

.postbottom,

#ad_text,

#ad_headerbanner,

.ad_footerbanner,

.ad_column,

.ad_textlink1,

.ad_textlink2,

.forumlinks,

.forumimglink,

.forumtxtlink,

*[class^=”ad_float_”],

/* 远景 */

#pb_news #pb_n_c,

#pb_forum #forumheader,

#viewthread .threadfix #focus,

.postcontent .node-gg,

/* 百度 */

*[src*=”cpro.baidu.com”],

*[src*=”eiv.baidu.com”],

/* 百度贴吧 */

#pg #m #girl,

#rightAd,

#ecomAdDiv,

.c_post_title .forward,

#thread_footer .forward,

.c_post .t,

.c_post_info .c_author .follow,

.c_post_info .c_author .follow_male,

.c_post_info .c_author .follow_female,

#ec_im_container,

*[href^=”http://www.baidu.com/adrc.php”],

table[width=”65%”][bgcolor=”#ebebeb”][style=”margin-left: 15px;table-layout:fixed;”],

/* 天空软件 */

*[id^=”baidu_clb_slot_”],

/* 华军软件 */

#wide_ad_unit.wide_ads,

#lovexin12,

#lovexin14,

#content .a970,

object[width=”970″][height=”60″],

*[src*=”/newhuagg/”],

.a-intro object[width=”300″][height=”200″],

/* cnbeta */

#h_right #userInfo,

#post #comad,

#foot object,

#content #AdForward,

#sideBar #votes #vote_content,

#sideBar #fm,

#sideBar #fm_r,

#c_focusAndHot #c_ad,

*[src*=”u17.com/upload/FCK/image”],

*[src^=”http://img.cnbeta.com/youdao”],

*[src^=”http://img.cnbeta.com/ks576.”],

*[src=”http://img.cnbeta.com/gord_300.jpg”],

*[src=”http://img.cnbeta.com/rk3d.gif”],

#newsBox #news object[width=”576″][height=”60″],

#feedback center object[width=”300″][height=”250″],

*[id*=”google_ads”],

#wrapper object[width=”950″][height=”90″],

a[href*=”?from=cnbeta”],

/* 驱动之家 */

*[id^=”ad_”],

*[src*=”11.mydrivers.com”],

/* 谷歌音乐盒 */

.ads-absolute,

/* 太平洋软件 */

*[src^=”http://imgad”][src*=”.3conline.com/”],

div[class^=”dlcolse”],

div[id=”ivyPC”][class=”wrap”],

#PcPoPmarket,

*[href*=”click?adid=”],

object[id^=”ad”],

.adv_right1,

.adv_top,

.art_adv_bottom_comment,

.left640 .box2,

/* 网易 */

*[id^=”i2pd_”],

div[id^=”tcldivtf”],

*[href^=”http://g.163.com/c?AID=”],

.gg *[id^=”iframe_banner”],

.ggarea,

iframe[src^=”http://g.163.com/r?”],

.rightContent embed[src*=”126.net/channel”],

.bg_endPage,

.header .gg,

#ead_ad_14,

.gg360,

.gg200x300,

.endYoDao,

.gg560,

.colL .gg590,

.theme-tl .links .chl,

#divwelcome .part-sec,

.gIbx-tablayout *[id*=”FakeLetterDiv”],

.blkTopGoogleSearch,

#conBody .sidebar .HSpace_10,

.RtTxtAD,

#conBody .sidebar .adNone,

#conBody object[width=”950″][height=”40″],

.Ad_01,

.qyfwBlk,

/* 新浪 */

#SteamMediaWrap,

#CoupletMediaWrap,

.MIB_mbloglist .tipsBox,

div[class^=”missionBox s_bg”],

div[class=”widgetIntroduce widgetH2″],

*[src^=”http://d”][src*=”.sina.com.cn”],

IFRAME[src*=”sina.com.cn/iframe/”],

#seIfm,

#page .topads,

#vlog .AD355125,

*[id^=”i2AS_container_div_”],

*[id^=”FullScreen”],

*[id*=”_AdSame_”],

.grid-640 .adBlock,

.topAD,

*[id^=”flashcontent_”],

object[id*=”_swf”],

.MIB_mbloglist .PY_clew,

/* 凤凰网 */

#topBj *[id^=”ad”],

#topBj .areaAd,

#topBj #flashad,

#topBj #VideoPlayer,

#topBj .pic660,

#topBj #StreamMediaWrap,

*[id^=”i2PT_”],

#StreamMediaWrap #smExtObj,

#StreamMediaWrap #smTagObj,

object[id^=”flashad”],

#final_head_ad,

#main_right .right_picAd,

#main_right DIV[class^=”adlist”],

IFRAME[src*=”all_content_ad_”],

IFRAME[src=”http://book.ifeng.com/special/90niandai/blog3/”],

.ad_pic,

.ad_text,

#main_left .maidunbox,

.ad950,

/* 腾讯网 */

*[src^=”http://ads”][src*=”.qq.com”],

.AdTop-Article-QQ,

#AdRight-Article-QQ,

#sideBars #News_F_UpRight,

.business-Article-QQ,

.AdBox-Article-QQ,

.qiye-Article-QQ,

#QQ_Right_button1,

#QQCOM_Width2,

#QQCOM_Width3,

#QQCOM_Button2,

.adArea #charge_content,

#tipsAll #tipswindow,

div[id=”tipsAll”][class=”tipwindow”],

#soAdSwf,

#cssSkin DIV[id^=”div_kkkl”],

#cssSkin DIV[id^=”div_nike”],

*[src*=”http://mat1.gtimg.com/worldcup/20100506/27_60_100609.jpg”],

.ad_article_box,

#sideBars embed[id=”flash_focus”],

/* 115网盘 */

.publicize[style=”width:100%; height:90px;”],

.row>.down-l+.down-r,

/* 天涯 */

*[id^=”adsp_”][id*=”_banner”],

*[id^=”adsp_content_replybox_img_”]

{display:none !important}

/* ==================== 以下代码需IE9才支持 ==================== */

/* google */

#gsr #center_col #tads:nth-child(1),

#gsr #cnt #rhs:nth-child(3),

/* 百度贴吧 */

.c_post_info .c_author li:nth-child(2),

.c_post:nth-child(n+4) .c_post_title

{display:none !important}

</pre>
二、打开“Internet选项”,点击“辅助功能”,勾选“使用样式表编排文档格式”,选中ad.css,确定,好了,远景以及很多Discuz论坛的广告是不是都看不到了?
本方法适用于IE9、IE8,更早的版本请大家自己测试。
本方法能过滤掉几乎任何网站的广告,但具体CSS代码要自己写,这里只提供我自己常去的几个网站的部分代码。
附:如果你想把所有网页的字体都强制改为雅黑,可以在代码的开头(或最后)加入一行:

*{font-family:微软雅黑 !important}

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部