2
我的页面最顶部有一个jquery触发器,最终会打开窗体。问题是,当面板扩展时,它会压下它下面的所有内容,而不是面板覆盖内容。我如何确保面板扩展到内容而不是推下去?如何让jquery切换操作遍历所有内容?
我只有基本的slideToggle功能设置:
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<p>this will be a form</p>
</div>
<p class="flip">sign up!</p>
</body>
</html>
我可以做这个没有位置:绝对?当我放大或缩小绝对位置时,选项卡不会随页面一起缩放。 – user701510 2011-06-11 03:29:16