Javascript 带有html内容的jquery ui工具提示

Javascript 带有html内容的jquery ui工具提示,javascript,jquery,html,css,jquery-ui,Javascript,Jquery,Html,Css,Jquery Ui,我想使用 如何设置html内容的工具提示格式,如下图所示。 js:- 试试这个 CSS .arrow { bottom: -16px; height: 10px; position: absolute; right: -13px; top: 50%; width: 15px; } .arrow.top { /*top: -16px; bottom: auto;*/ } .arrow.left { left: 20%; }

我想使用 如何设置html内容的工具提示格式,如下图所示。

js:-

试试这个

CSS

.arrow {
    bottom: -16px;
    height: 10px;
    position: absolute;
    right: -13px;
    top: 50%;
    width: 15px;
}
.arrow.top {
    /*top: -16px;
    bottom: auto;*/
}
.arrow.left {
    left: 20%;
}
.arrow:after {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border-bottom: 10px solid rgba(0, 0, 0, 0);
    border-left: 13px solid #FAF9DD;
    border-top: 10px solid rgba(0, 0, 0, 0);
    bottom: 0;
    box-shadow: 6px 5px 9px -9px #000000;
    content:" ";
    position: absolute;
    right: 0;
}
.arrow.top:after {
    /* bottom: -20px;
    top: auto;*/
}
脚本

$('[rel=tooltip]').tooltip({
    position: {
        my: "center bottom+90",
        at: "left-170",
        using: function (position, feedback) {
            $(this).css(position);
            $("<div>")
                .addClass("arrow")
                .addClass(feedback.vertical)
                .addClass(feedback.horizontal)
                .appendTo(this);
        }
    }
});
$('[rel=tooltip]')。工具提示({
职位:{
我的:“中底+90”,
在:“左-170”,
使用:功能(位置、反馈){
$(this.css(position);
$("")
.addClass(“箭头”)
.addClass(反馈.垂直)
.addClass(反馈.水平)
.附于(本);
}
}
});

试试这种

jsfiddle.net/dpjw2/18


添加工具提示左对齐

类似这样的内容?@dholakiyaankit是的几乎正确,除了箭头谢谢我应该将其作为answer@dholakiyaankit是的,但请在左侧对齐工具提示谢谢,但工具提示内仍有边框
.arrow {
    bottom: -16px;
    height: 10px;
    position: absolute;
    right: -13px;
    top: 50%;
    width: 15px;
}
.arrow.top {
    /*top: -16px;
    bottom: auto;*/
}
.arrow.left {
    left: 20%;
}
.arrow:after {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border-bottom: 10px solid rgba(0, 0, 0, 0);
    border-left: 13px solid #FAF9DD;
    border-top: 10px solid rgba(0, 0, 0, 0);
    bottom: 0;
    box-shadow: 6px 5px 9px -9px #000000;
    content:" ";
    position: absolute;
    right: 0;
}
.arrow.top:after {
    /* bottom: -20px;
    top: auto;*/
}
$('[rel=tooltip]').tooltip({
    position: {
        my: "center bottom+90",
        at: "left-170",
        using: function (position, feedback) {
            $(this).css(position);
            $("<div>")
                .addClass("arrow")
                .addClass(feedback.vertical)
                .addClass(feedback.horizontal)
                .appendTo(this);
        }
    }
});