我在 css/jQuery 中的菜单有问题,在 Firefox 中运行良好,但在 IE、Opera、Chrome 中...当我将鼠标悬停在元素上时,它会转到页面的左边缘...
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap.min.css" rel="stylesheet" />
<style type="text/css"> .outer {width: 46px; height: 40px; position: fixed; z-index: 999999; display: block; top: 25%; right: 0px; background: #036; }.inner {overflow: hidden;width: 100px;} .modal {display: none;} .modal-inner {width: 600px;margin: 100px auto;height: 300px;background: #fff !important;border: 12px solid rgba(222, 222, 222, 0.8);z-index: 999999;border-radius: 5px;}.backdrop {z-index: 999998;}</style>
</head>
<body>
<div class="outer">
<div class="inner" style="">Subscription</div>
</div>
<script type="text/javascript">
$('.outer').on('mouseenter', function () {
$(this).animate({ left: "-=100", width: "+=100" });
});
$('.outer').on('mouseleave', function () {
$(this).delay(200).animate({ left: "+=100", width: "-=100" });
});
$('.outer').click(function () {
$('.outer').animate({ left: "+=146" });
$('.modal').modal();
});
</script>
<div class="modal">
<div class="modal-inner">
Lorem ipsum
</div>
</div>
</body>
</html>
我在哪里做错了?