全,
在以下代码中
<html>
<head>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="http://jqueryui.com/latest/jquery1.3.2.js">
</script>
<script src="http://jqueryui.com/latest/ui/effects.core.js"></script>
<script src="http://jqueryui.com/latest/ui/effects.slide.js"></script>
<style type="text/css">
#show { margin: 0px; width: 100px; height: 80px; background: green; border: 1px solid black; position: relative; }
</style>
<script>
$(document).ready(function(){
$("#details").mouseover(function() {
$("#show").show("slide", {}, 1000);
});
</script>
</head>
<body>
<div id="details">keyword</div>
<div id="show" style="display:none;"></div>
</body>我必须把显示div在页面中间的鼠标在细节上div.Can你告诉我如何可以做到.....
谢谢...............
发布于 2010-02-04 02:29:00
像这样的东西?
$("#details").mouseover(function() {
var theTop = ($(window).height() / 2) - $('#show').height();
$("#show").show().css({margin:'0 auto', top:theTop});
});发布于 2010-02-04 02:18:09
如果你正在谈论灯箱效果,有很多jQuery插件可以为你处理这个问题。下面是一些例子:
http://leandrovieira.com/projects/jquery/lightbox/
https://stackoverflow.com/questions/2194263
复制相似问题