漂浮窗口代码

<!---漂浮窗口代码start--> 
<div align="center" style="position: absolute; top: 470px; background: red; line-height: 30px;
background: #CCCCCC; background: red" id="labeller_layer">
<a href="<?php global $conf; echo $conf['shenqing_weburl']; ?>"  target=_blank >
<img src="<?php   global $conf; echo $conf['shenqing_imgurl']; ?>" /></a>
</div>
<script type="text/javascript">
window.onscroll = _onScroll;
function _onScroll(){	
    var labeller_layer = document.getElementById('labeller_layer');
    var scrollTop = document.documentElement.scrollTop + document.body.scrollTop;
    labeller_layer.style.top = (scrollTop+470)  + 'px';
};
</script>
<!---漂浮窗口代码end-->

你可能感兴趣的:(漂浮窗口代码)