<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>
.fixed_banner {
position: fixed;
bottom: 10px;
height: 100px;
z-index: 10000;
display: none;
}
原文:https://www.cnblogs.com/fujie818/p/14271057.html