我正在为数据使用剑道网格,对于一个字段,我正在使用 Angular 工具提示,所以我有一个工具提示问题,在第一行中,工具提示隐藏在剑道网格标题下,所有其他行都适用于 z-index。所以我想将 z-index 添加到该字段,以便它也可以在第一行可见。如何使用 css 完成该任务?
配置.js
{
field: 'locationComments',
title: 'Location Comments',
width: '210px',
filterable: false,
sortable: false,
template: function () {
return '<textarea '+
'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" dropdown-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-content table tr td textarea.toolTipIndex {
z-index:10002;
}
最佳答案
使用工具提示属性 tooltip-append-to-body="true"使其位于 dom 之外,以防止弹出。
关于javascript - 如何设置工具提示 z-index 大于剑道网格标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35297682/