HTML:
<div class="dls"><div class="duilian duilian_left">左对联</div><div class="duilian duilian_right">右对联</div></div>
CSS:
.dls{ width:1330px; margin:auto; position:relative}
.duilian{top:0px;position:absolute; width:170px; overflow:hidden; z-index:20}
.duilian_left{ margin-left:0px;} .duilian_right{margin-left:1160px;}
JS:
<script type="text/javascript">
$(document).ready(function(){
var duilian = $("div.duilian"); duilian.animate({top:269},1000);
$(window).resize(function(){var window_w = $(window).width(); if(window_w>1320){duilian.show();}else{duilian.hide();}});
$(window).scroll(function(){ var scrollTop = $(window).scrollTop(); duilian.stop().animate({top:scrollTop+269},1000); });
});
</script>
上一篇:asp多表联合查询总结
讨论数量:0