js部分:
<script> function getTop() { var mytop = $(document).scrollTop(); if (mytop > 400) { $(".fixed_banner").css({ ‘display‘: ‘block‘, ‘top‘: 0, }); } else { $(".fixed_banner").css(‘display‘, ‘none‘); } setTimeout(getTop); } getTop(); </script>
css部分
.fixed_banner { position: fixed; bottom: 10px; height: 100px; z-index: 10000; display: none; }