美化Google Adsense的办法
首先,做一个背景图片(如下面这个),上传到模版目录中的images目录下,宽和高555×79,当然背景图的大小你完全可以自已定义,这取决于你将展示的Google Adsense广告尺寸大小。
seover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('/School/UploadFiles_9201/200608/20060819004229362.jpg');}" src="http://www.tingko.net/School/UploadFiles_9201/200608/20060819004229362.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
然后,在模板的style.css样式表文件中加入下面的代码:
#gsbg_single {
width: 480px;
height: 70px;
background-image: url(images/gsbg2.jpg);
padding-top: 10px;
padding-left: 75px;
}
最后在确定你需要显示的地方,在模版中的相应地方插入下面代码:
<div id=gsbg_single>
##这里插入Google adsense代码
</div>
如果位置有所偏差,再调试一下padding-top或padding-left的值,直到位置正确就可以了。
效果如下:
seover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('/School/UploadFiles_9201/200608/20060819004229776.jpg');}" src="http://www.tingko.net/School/UploadFiles_9201/200608/20060819004229776.jpg" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>
我再补充一下,加上背景图片后要修改Adsense的字体和边框颜色为#CBECF5,当然你也可以自定义
还想讨论个问题:
这个形式的Adsense美化我记得以前论坛里面讨论过是符合规则的,但是下面的这个为什么被Google警告呢?是不是因为图片内容不雅?或者其他原因...大家觉得呢?
seover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('/School/UploadFiles_9201/200608/20060819004231806.png');}" src="http://www.tingko.net/School/UploadFiles_9201/200608/20060819004231806.png" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0>