Skip to main content
 首页 » 编程设计

jQuery qtip 不会在 IE8(或 IE7)中绘制小箭头提示

2026年07月28日7bjzhanghao

我正在使用 jquery 的 qtip 插件来绘制工具提示,它在 FF 上运行良好,但在我的 IE 版本上运行不佳。看起来对于 IE,该插件使用 vml 标签而不是 canvas 标签。我需要在页面中包含一些额外的内容才能显示小箭头提示吗?这是我的简单 html 页面;请注意,当您将鼠标悬停在“工具提示目标”上时,会显示灰色框,但不会显示箭头提示:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
<head> 
    <script type="text/javascript" src="/jquery-1.4.2.js" /> 
    <script type="text/javascript" src="/jquery.qtip-1.0.0-rc3.js" /> 
</head> 
<body> 
    <a id="my_tooltip">tooltip target</a> 
 
<script type="text/javascript">//<-- 
    jQuery(document).ready(function() { 
        jQuery("#my_tooltip").qtip({ 
        "content": { 
            "text": "this is a test" 
        }, 
       "position": { 
       "corner": { 
       "target": "bottomMiddle", 
       "tooltip": "topMiddle" 
       } 
       }, 
       "style": { 
       "tip": { 
       "corner": "topMiddle", 
       "color": "#999999", 
       "size": { 
       "x": 10, 
       "y": 10 
       } 
   }, 
   "border": { 
   "width": 2, 
   "radius": 3, 
   "color": "#999999" 
   } 
} 
}); 
 
}); 
// --></script> 
</body> 
</html> 

请您参考如下方法:

事实证明,为了让 qTip 能够与 jquery-1.4.2 一起使用,我必须升级到更高版本的 qTip。我首先尝试了最新版本 (#55),但是出现了递归错误,因此我选择了版本 #27,它被列为具有 1.4.2 兼容性。这让我的箭头提示出现了,耶!