【发布时间】:2014-01-30 18:44:57
【问题描述】:
我是 javascript 的新手,尝试使用工具提示在网页上显示图像标题。
我根据各种示例改编的代码在 Firefox 上按预期工作,但在 Google Chrome 上颠倒了 my & at 位置,在 IE 上根本不工作。
<script>
$(function() {
$( document ).tooltip( { position: {my: 'center bottom+10' , at: 'center top'}});
});
</script>
这是在 Chrome 和 Firefox 中可以正常使用的样式,但在 IE 中无法调整大小或显示弯角
<style type="text/css">
.ui-tooltip-content {
display: inline-block;
background:transparent;
padding:5px;
font: bold 14px "Arial", Sans-Serif;
color: #000080;
}
.ui-tooltip {
padding: 10px 20px;
color:#eee;
border-radius: 20px;
box-shadow: 0 0 7px black;
}
</style>
图书馆详情
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
有问题的页面在这里 http://www.millwall-history.org.uk/Season_1982-83.htm
【问题讨论】:
-
什么版本的IE? IE 直到版本 9 才支持
border-radius。 -
另外,如果您希望我们为其 API 提供帮助,您需要指明您正在使用的工具提示库/插件。
-
IE 9 是我检查它的那个。
标签: javascript jquery html css cross-browser