Created
March 11, 2011 03:40
-
-
Save huacnlee/865416 to your computer and use it in GitHub Desktop.
页面底部弹窗广告
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery need | |
setTimeout(showBTW, 1000); | |
function showBTW(){ | |
$("body").append('<div class="bottom_pop_window">\ | |
<div class="title">热门推荐<a href="#" onclick="return closeBTW();" class="close">关闭</a></div> \ | |
<iframe src="/btw" frameborder="no"></iframe></div>'); | |
$(".bottom_pop_window").css("bottom",-140).animate({ bottom : 10 }); | |
} | |
function closeBTW(){ | |
$(".bottom_pop_window").hide(); | |
return false; | |
} | |
// CSS | |
.bottom_pop_window {float: right;position: fixed;bottom: 10px;right: 10px;width: 300px; | |
height: 166px; border:1px solid #a31a40; padding:1px;background: #FFF;} | |
.bottom_pop_window .title { background:#d35a20; color:#FFF; padding:2px 6px; font-weight:bold; } | |
.bottom_pop_window .title a.close { float:right; font-size:12px; font-weight:normal; color:#FFF; } | |
.bottom_pop_window iframe { width: 300px; overflow:hidden; height:140px;} | |
* html .bottom_pop_window{position: absolute; | |
top: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight);} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment