css - 如何在包括正文在内的所有元素之上附加工具提示?

标签 css angularjs kendo-ui kendo-grid tooltip

我正在使用 kendo 网格,其中一个 td 有工具提示,但对于第一行,我的工具提示隐藏在 kendo 标题下,关于如何解决这个问题的任何想法我试图让它与 tooltip-append-to-body 一起工作并且还尝试使用 css 作为目标,但它不起作用。

配置.js

{
    field: 'locationComments',
    title: 'Location Comments',
    width: '210px',
    filterable: false,
    sortable: false,
    template: function () {
    return '<textarea class="zIndexTooltip" '+
    'data-tooltip-html-unsafe="<div>{{512 - this.dataItem.locationComments.length}} characters left</div>" '+
    'tooltip-trigger="{{{true: \'focus\', false: \'never\'}[this.dataItem.locationComments.length >= 0 || this.dataItem.locationComments.length == null ]}}" '+
    'tooltip-placement="top" tooltip-append-to-body="true" tooltip-class = "bluefill" '+
    'maxlength="512" #=gridStatus=="NOT_EDITABLE" ? "disabled" : "" # type="text" id="locationComments" name="locationComments" ng-model="this.dataItem.locationComments" ></textarea>';
}

配置.css

.k-grid tr td textarea.zIndexTooltip {
    z-index:100020;
}

最佳答案

我在我的配置中添加了以下代码并使用 .tooltip 设置了 z-index 来解决我的问题。

$tooltipProvider.options({ appendToBody:真 });

关于css - 如何在包括正文在内的所有元素之上附加工具提示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35318991/

相关文章:

javascript - 启用虚拟化时选择剑道网格中的行

html - 在 joomla (yootheme warp 7) 中编辑 Logo 链接目标

javascript - 显示 : none is flickering content that should be hidden when loading the webpage

angularjs - 如何在Tomcat 9的rewrite.config文件中为多个angular项目添加多个重写规则

javascript - 使用带有 <img> 标签的 CDN

javascript - 焦点问题使测试失败

jquery - 使用 Selenium/Geb 测试 Kendo UI 网格

java - Kendo UI 网格 Json 数据未加载

javascript - 更改 css 动画,使其在特定时间后自动运行

jquery - 如何在折叠/折叠时更改 Bootstrap Accordion 标题