踩 IE

I hate IE forever.

使用Opera的user.css过滤广告

优点
1 语法简单,初学者也可以自由定制
2 节约系统资源

缺点
1 需要花时间分析页面源代码
2 无法批处理,只能逐条添加过滤,比较费时间
3 对javascript随机动态生成的广告代码无能为力

综合以上优缺点,本方法比较适合那些用少量iframe和flash做广告的网站,比如http://www.tgfcer.com/club/,此外也可以有针对性地过滤自己不喜欢的某些页面区域。

用法介绍:主要是使用CSS的属性选择符来选择页面中的元素,语法大家一看便明白,即:
html元素名[属性="值"],需要同时选择多个元素时可以用半角逗号隔开它们。
后面的{ display: none; }可以不管,每新建一条规则把它复制到选择符后面,还不明白可以找一些CSS语法的入门介绍看看。

启用user.css:ctrl+F12,高级-内容,点击样式选项按钮,选择user.css的放置目录并在作者模式下勾选"我的样式表",确认。

屏蔽http://www.tgfcer.com/club/广告的示例,将以下代码复制到记事本另存为user.css:

/* google ads */
iframe[name="google_ads_frame"] { display: none; }
/* tgfc.com ads */
embed[src="http://www.tgfcer.com/club/2.swf"],
embed[src="http://www.tgfcer.com/club/gzimage/leifei.swf"],
embed[src="http://www.tgfcer.com/club/gzimage/wei.swf"],
embed[src="http://www.tgfcer.com/club/gz/GW_ad_Swf_TGFC.swf"],
img[src="http://www.tgfcer.com/club/gzimage/CCSHOPLOGO.jpg"],
img[src="http://stbanner.allyes.com/"],
iframe[src="http://www.tgfcer.com/club/gzimage/gzlist.asp"],
iframe[src="http://www.tgfcer.com/club/gzimage/gzlist4.asp"],
iframe[src="http://www.tgfcer.com/marquee.htm"]
{ display: none; }

使用条件注释使不同版本的IE读取不同的内容IE7 Beta2 Acid2 Browser Test Results...

Comments

Anonymous Thursday, January 26, 2006 12:14:20 AM

石门 writes: 完全看不懂,不过,还是留一爪-v-

Anonymous Friday, March 3, 2006 1:45:43 AM

Anonymous writes: 不知道说啥!

Xtpeakxtpeak Monday, March 13, 2006 2:34:39 AM

iframe[src="http://www.cmfu.com/ad3.htm"]
{ display: none; }
我设置了上面的,但去起点还是有广告的,怎么办啊

qicai02 Friday, June 9, 2006 2:16:09 AM

好啊,还有这种功能啊!

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies