Skip navigation.

踩 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 26. January 2006, 00:14

石门 writes:

完全看不懂,不过,还是留一爪-v-

Anonymous 3. March 2006, 01:45

Anonymous writes:

不知道说啥!

xtpeak 13. March 2006, 02:34

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

qicai02 9. June 2006, 02:16

好啊,还有这种功能啊!

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

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31