浮动图片 广告图片 示例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style>*{ margin:0; padding:0;text-align:center;}button{width:50px;height:20px;border:0;background:none;float:right;cursor:pointer;}.adclass{width:100%;margin:0 auto;}</style><script>//显示顶部展示图片function duiceadclient_quanping(apcode){var el=document.getElementById(apcode);el.style.visibility = "visible";el.style.display = "block";var adid=el.getAttribute("adid");var adidObj = document.getElementById(adid);adidObj.style.visibility = "visible";adidObj.style.display="block";//setTimeout("duiceadclient_quanpinghidediv('"+apcode+"')",10000)}//隐藏顶部展示图片function duiceadclient_quanpinghidediv(apcode){var apObj = document.getElementById(apcode);apObj.style.visibility = "hidden";apObj.style.display = "none";}</script></head><body><!--顶部展示图片--><div id="CH_SY_QP_00001" pushtype="nopv" adid="007XR"><div id="007XR" area='[]' style="display:none"><img src="http://www.google.cn/landing/cnexp/google-search.png" width="514" height="257" border="0"></div></div><script>duiceadclient_quanping("CH_SY_QP_00001");</script><!--两侧浮动图片--><div id="129298440407846492" ><SCRIPT>function play() {if (screen.width <= 800 || closeB) {for (var i = 0; i < collection.length; i++) {collection[i].object.style.display = "none";}return;}for (var i = 0; i < collection.length; i++) {var followObj = collection[i].object;var followObj_x = (typeof (collection[i].x) == "string" ? eval(collection[i].x) : collection[i].x);var followObj_y = (typeof (collection[i].y) == "string" ? eval(collection[i].y) : collection[i].y);if (followObj.offsetLeft != (document.documentElement.scrollLeft + followObj_x)) {var dx = (document.documentElement.scrollLeft + followObj_x - followObj.offsetLeft) * delta;dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));followObj.style.left = followObj.offsetLeft + dx + "px";}if (followObj.offsetTop != (document.documentElement.scrollTop + followObj_y)) {var dy = (document.documentElement.scrollTop + followObj_y - followObj.offsetTop) * delta;dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));followObj.style.top = followObj.offsetTop + dy + "px";}}}function closeBanner(obj) {obj.style.display = "none";}var delta = 0.15;var collection;var closeB = false;function floaters() {this.items = [];this.addItem = function (id, x, y, content) {document.write("<DIV id=" + id + " style="z-index:999; position:absolute; width:110px; height:300px; left:" + (typeof (x) == "string" ? eval(x) : x) + ";top:" + (typeof (y) == "string" ? eval(y) : y) + "">" + content + "</DIV>");var newItem = {};newItem.object = document.getElementById(id);newItem.x = x;newItem.y = y;this.items[this.items.length] = newItem;};this.play = function () {collection = this.items;setInterval("play()", 10);};}var theFloaters = new floaters();theFloaters.addItem("leftDiv01", 6, 145, "<a href="#" target="_blank" title=""><img src="http://www.baidu.com/img/baidu_logo.gif" width="270" height="129" border="0" /></a><br /><button onClick="closeBanner(this.parentNode);">关闭</button>");theFloaters.addItem("rightDiv01", "document.documentElement.clientWidth-127", 145, "<a href=# target=_blank title=1><img src="http://img02.taobaocdn.com/tps/i2/T1iQhUXnxpXXXXXXXX-171-48.png" width="171px" height="48px" border="0" /></a><br /><button onClick="closeBanner(this.parentNode);">关闭</button>");theFloaters.play();</SCRIPT></div><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p></body></html>?