$(function () {
$(window).scroll(function () {
if ($(window).scrollTop() > 200) {
$(".list:eq(0)").delay("slow").show();
$("#wei").delay("fast").show();
}
else {
$(".list:eq(0)").delay("slow").hide();
$("#wei").delay("fast").hide();
}
});
});
<style type="text/css">
*{margin: 0; padding: 0;}
div{background: red; width: 100%; height: 3000px;}
div.list{height: 100px; width: 100%; background: green; position: fixed; display:none; }
div#wei{width: 20px;height: 100px; background: blue; position: fixed; top: 500px; left: 100px; display: none;}
</style>
<body>
<div>
<div class="list"></div>
<div id="wei"></div>
</div>
</body>
</html>
习惯受伤
习惯受伤
相关分类