【发布时间】:2012-03-31 03:29:56
【问题描述】:
以下是我为显示工具提示内容而编写的代码。由于模态窗口小于工具提示内容,我需要在模态窗口上方显示工具提示内容,而不是在内部生成它。我尝试使用 Z-index,但效果不佳。谁能帮我解决这个问题?
<html>
<head>
<wicket:head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<link rel="stylesheet" type="text/css" href="css/SendTestEmailPanel.css"/>
<script src="/scripts/bt-0.9.5-rc1/jquery.bt.min.js" type="text/javascript"></script>
<script src="/scripts/jquery.hoverIntent.minified.js" type="text/javascript"></script>
<script src="/scripts/bgiframe_2.1.1/jquery.bgiframe.min.js" type="text/javascript"></script>
</wicket:head>
</head>
<body>
<wicket:panel xmlns:wicket="http://wicket.apache.org/">
<div id="send-test-email-panel">
<h1>Test</h1>
<div id="tool-tip-div">
<div style="float:left; margin-top:4px; margin-left:275px;position:absolute;z-index:2">
<span class="help" id="email-address-tooltip" title="placeholder_text"> </span>
</div>
</div>
</div>
<div id="email-tooltip-content" style="display:none">
<ul>
<li>To preview what your email fans will see, enter your email address and send a test to yourself.</li>
<li>Links and buttons will be inactive in the test email. </li>
<li>In the live email, the Grab It Now button links to your offer. If your fan is on a desktop computer, they will see the full web version of your offer. If they are viewing the email on their phone, they'll go directly to the mobile version of your offer.</li>
</ul>
</div>
<script type="text/javascript">
var trigger = ['mouseover', 'mouseout'];
var width = '180px';
var pos = 'right';
ShowPopup($('#email-tooltip-content'),
$('#email-address-tooltip'),
trigger,
"$('#email-tooltip-content').html()",
width,
pos
);
</script>
</wicket:panel>
</body>
</html>
【问题讨论】:
-
与 "" 没有问题
-
也许我没听懂你的意思。如果你想要提升工具提示,你可以使用“top:-Npx”或“margin-top:-Npx”
-
由于我不允许在此处发布图像,i54.tinypic.com/246w57l.png 模态窗口将像黄色矩形,工具提示将像紫色矩形。
-
好的。如果我理解正确,您可以使用“顶部:-Ypx”和“左侧:-Xpx”或以相同方式使用边距。但也许它不是整个 src 并且来自另一个文件的块会改变您面板中的某些内容:(
标签: java javascript tooltip overlay wicket