




已阅读5页,还剩1页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
仿 Google Adsense 广告特效 因为站内上了大量的广告,现对外销售,所以在每个广告的右下角都会留一个链接,链接 指向广告自助投放系统,根据链接地址自动判断广告来源的页面,技术上的问题不多做讨 论,主要说一下仿 Google Adsense 右下角的特效。 Google Adsense 右下角的弹出隐藏效果应该是用 Flash 实现的,不太适合移植和批量使用, 这是个缺点。个人一向喜欢用最少的代码实现最好的效果,所以发挥 DIY 的精神,用 CSS 来实现了这种效果,先看效果再讲代码。 Google Adsense 的效果: 模仿的效果: 下面说一下实现的方法: 1、主要是使用了相对定位和绝对定位,以及 Z-index,使用这三个属性,可以制作层层叠 起的效果,之前在”“这篇文章也讲过这个使用方法,使用这三个属性给 Flash 加链接,方 法在此就不多说了,可以到这里看一下方法: 2、第一步解决了定位问题,第二步就是做展开折叠的效果,这个效果其实很简单,利用了 A 的属性,默认情况下显示的是小图,当鼠标放在上面,利用了 A 的 a:hover 属性来替换 图片即可实现。 在这一步中,图片的设计很重要也很关键,一开始是用了一大一小两张图片,后来发现鼠 标移动上去的时候在 IE6 下会出问题(又是该死的 IE6) ,于是重新思考了一下,重新设计 了图片,使用两张大小相同的图片来替换,其中的妙处各位自己体会喽。 3、页面实现代码 职场白领该如何贷 款最快速? 月收入 2000 如何 快速拿贷款? 急需 30 万? 创业从 此不用愁 加入展贷通 贷款 成交提高 7 倍 具体的意思可参考附件中的展示效果,在此不多说。 4、CSS 代码编写: /* put in button */ .putbtn, .putbtntext, .putbtnindextext, .putbtnmortext, .putbtnrichtext, .putbtns100100, .putbtn260100, .putbtn260200, .putbtn27065, .putbtn410100, .putbtn680100 position:relative; display:inline-block; .putbtn .ShowR, .putbtn .title right:0; bottom:0; text-align:right; .putbtn .ShowT top:0; left:0; .putbtn .ShowR, .putbtn .title, .putbtn .ShowT z-index:100; position:absolute; .putbtn .putlist z-index:-100; position:absolute; .putbtn .putlist ul padding-left:0; .ShowR a .span90X14, .ShowR a:link .span90X14, .ShowR a:visited .span90X14 width:90px; height:14px; display:inline-block; background:url(/Gbimages/putin/t1_90X14.gif) no-repeat; .ShowR a:hover .span90X14 background:url(/Gbimages/putin/t2_90X14.gif) no-repeat; /* single row text */ .putbtntext width:950px; height:30px; .putbtntext ul margin:0; padding:0; height:30px; width:950px; text-align:center; background:#fff4de; .putbtntext ul li float:left; width:230px; height:30px; font-size:14px; text-indent:18px; margin-left:5px; display:inline-block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; background:url(/Gbimages/putin/adsarrow_13X13.gif) no-repeat 0 8px; .putbtntext ul li a, .putbtntext ul li a:link, .putbtntext ul li a:visited float:left; color:#00f; line-height:30px; display:inline-block; text-decoration:underline; .putbtntext ul li a:hover color:#f35000; /* row height:100px; .putbtnmortext ul margin:0; width:678px; padding:5px 0; margin-bottom:5px; overflow:hidden; border:1px solid #ccc; background:#fef4e8; .putbtnmortext ul li padding:0; float:left; width:220px; display:inline; margin:2px 0 2px 5px; .putbtnmortext ul li a margin:0; padding:0; height:26px; display:block; text-indent:7px; font:normal 12px/26px “宋体“; background:url(/Gbimages/dot_black_33.gif) 0 10px no-repeat; .putbtnindextext width:260px; height:100px; .putbtnindextext ul margin:0; width:258px; padding:5px 0; overflow:hidden; border:1px solid #ccc; background:#fef4e8; .putbtnindextext ul li padding:0; float:left; width:220px; display:inline; margin:0 0 0 5px; .putbtnindextext ul li a margin:0; padding:0; height:22px; display:block; text-indent:7px; font:normal 12px/22px “宋体“; background:url(/Gbimages/dot_black_33.gif) 0 8px no-repeat; /* rich text */ .putbtnrichtext width:308px; height:170px; border:1px solid #ccc; .putbtnrichtext .title width:303px; overflow:hidden; padding-right:5px; background:#eee; .putbtnrichtext ul width:300px; margin:5px; .putbtnrichtext ul li float:left; width:100%; padding-bottom:5px; .putbtnrichtext ul li a color:#000e6b; font-size:14px; text-decoration:underline; .putbtnrichtext ul li p text-indent:0; line-height:22px; /* single image, s100X100 */ .putbtns100100, .putbtns100100 .putlist img width:100px; height:100px; /* single image, 260X100 */ .putbtn260100, .putbtn260100 .putlist img width:260px; height:100px; /* single image, 260X200 */ .putbtn260200, .putbtn260200 .putlist img width:260px; height:200px; /* single image, 270X65 */ .putbtn27065, .putbtn27065 .putlist img width:270px; height:65px; /* single image, 410X100 */ .putbtn410100, .putbtn410100 .putlist img width:410px; height:100px; /* single image, 680X100 */ .putbtn680100, .putbtn680100 .putlist img width:680px; height:100px; /* row images, 100X100 */ .putbtn100100 width:680px; height:100px; .putbtn100100 .putlist img width:100px; height:100px; margin:0 12px; /* column images */ .putinmoreimgs float:left; width:260px; .putinmoreimgs .adstop, .putinmoreimgs .adsbottom, .putinmoreimgs ul float:left; .putinmoreimgs .adsbottom margin-top:-4px; .putinmoreimgs ul padding:0; .putinmoreimgs ul li float:left; display:inline; margin:0 0 4px; *margin:0; .putinmoreimgs ul li img width:260px; height:200px; /* title width:950px; .putintextimgs .adstop height:33px; background:url(/Gbimages/putin/list_950X33.gif) no-repeat; text- align:right; .putintextimgs .adstop a, .putinmoreimg .adstop a:link, .putinmoreimg .adstop a:visited color:#555; padding:0 5px; margin:10px 10px 0 0; display:inline-block; text-decoration:underline; .putintextimgs .adsbottom height:10px; background:url(/Gbimages/putin/list_950X10.gif) no-repeat; .putintextimgs ul width:948px; padding:8px 0 0 0; background:#f4f4f4; border-left:1px solid #ccc; border-right:1px solid #ccc; .putintextimgs ul li float
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年版医疗器械性能改进与保修服务合同
- 2025年跨区域搬家及临时仓储服务协议
- 2025年城市综合体商业租赁合同调整及配套设施优化协议
- 2025年智慧养老社区老年人活动室场地及课程包租赁协议
- 2025年度物联网设备专业物流配送及维护保养合同
- 水彩线描水果课件
- 2025年度定制化销售台账模板设计及市场趋势预测服务合同
- 2025年国际教育交流与境外游学项目合作协议
- 安徽旅游民宿租赁经营合同2025年乡村民宿管理规范文本
- 2025年度铁路集装箱物流配送合同(含智能仓储管理)
- 《患者安全目标解读》课件
- 甲状腺功能亢进症课件
- 锂离子电池正极材料研究进展
- 二手房屋买卖物品交接清单
- 技师论文 变频器的维修与保养
- 非标自动化设备项目进度表
- 诊断学教学胸部查体
- 桥梁安全事故案例警示
- SB/T 10460-2008商用电开水器
- GB/T 9124.1-2019钢制管法兰第1部分:PN系列
- GA 1800.2-2021电力系统治安反恐防范要求第2部分:火力发电企业
评论
0/150
提交评论