我有一个固定的菜单,但我没有得到它,如何使用div容器移动它
$(window).scroll(function(){
$('.menu').css('left',-$(window).scrollLeft());
});
我使用这个Jquery片段,它只允许我通过调整大小来移动菜单,但是我不能用div移动菜单
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link href="stylesheets/style.css" rel="stylesheet">
</head>
<body>
<div class="page-wrap">
<div class="page-content">
<div class="menu">
</div>
<div class="avatar-container">
<div class="avatar-puls"></div>
<div class="avatar-frame">
<img class="avatar-img" draggable="false" src="images/avatar.png">
</div>
<div class="circle"></div>
</div>
<div class="posts">
<div class="up-line"></div>
<div class="post">
<div class="cycle">
<img class="cycle-img" draggable="false" src="images/maps/1.png">
</div>
</div>
<div class="cycle-middle">
<div class="line"></div>
<div class="outer-dot"></div>
<div class="inner-dot"></div>
<div class="line"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/reload.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/classie.js"></script>
<script type="text/javascript" src="js/modalEffects.js"></script>
<script type="text/javascript">
$(window).scroll(function(){
$('.menu').css('left',-$(window).scrollLeft());
});
</script>
</body>
</html>