html - 当在 ngbpopover 中使用 container="body" 时,Ngbpopover 不采用在 ng-template 中定义的外部 css
问题描述
我希望我的 ngbpopover 出现在父元素的顶部,因为它出现在父元素的下方。我已将 container="body" 放入 ngbpopover 以解决给定的问题,但不知何故,我在 ng-template 中定义的外部 css 没有出现。
<mat-tab-group animationDuration="0ms">
<div *ngFor="let sampleData of sampleDataInfo[j]; let i=index">
<mat-tab label="{{targetData[j][i].fullName}}">
<table class="source-target-Info-table">
<tr class="source-target-Table">
<th><img data-toggle="tooltip" data-placement="bottom" title="Sub1"></th>
<th>row2</th>
<th>row3</th>
<th>row4</th>
<th>row5</th>
<th>row6</th>
<th>row7</th>
<th>row8</th>
<th>row9</th>
<th>row10</th>
</tr>
<tr *ngFor="let target of targetData[j][i].files; let file=index">
<td>
<a class="info-link" href="javascript:;" title=" Log-{{sampleData?.sessionId}}" (click)="openDexLog(j,i)">
{{(1)}}
</a>
</td>
<td *ngIf="target.qualityLevel > 0; else negativeQuality">
**<a class="info-link" href="javascript:;" title="Click to see Quality result files" href="javascript:;" placement="top-left" popoverClass="popover-class" [ngbPopover]="popContentQuality" container="body">{{target.qualityLevel}}</a>**
</td>
**
<ng-template class="quality-popover" #popContentQuality>**
<h1 class="quality-heading">Quality Results for</h1>
<h3 class="file-name">{{target.name}}</h3>
<table class="source-target-Info-table">
<tr class="source-target-Table">
<th>FILE NAME</th>
<th>SIZE</th>
<th>DESCRIPTION</th>
</tr>
<tr *ngFor="let tq of tqData; let i=index">
<td>
<a class="info-link" href="javascript:;">{{tq.name}}</a>
</td>
<td>{{tq.size/1000}} KB</td>
<td>{{tq.description}}</td>
</tr>
</table>
</ng-template>
</tr>
</table>
</mat-tab>
</div>
</mat-tab-group>
如果以内联格式(使用样式)定义,则仅采用 css。当 ng-template 中的 ngbpopover 的 container="body" 时,是否有任何东西可以使外部 css 工作?我还尝试在由 body 标签组成的组件中定义外部 css,但这对我不起作用。任何有关此的建议都会有所帮助。
解决方案
推荐阅读
- react-native - 反应原生错误:致命异常:OkHttp Dispatcher;进程:com.tigergameapp,PID:23377;java.lang.OutOfMemoryError:无法分配 JNI 环境
- c - 为什么无符号变量仍然处理负数?
- mysql - MySQL 错误 #1064 - 使用 phpMyAdmin 创建用户
- javascript - 如何使用 konva 绘制带有变换矩阵的形状?
- firebase - 如何在本机反应中显示来自firestore数据库的一组图像?
- jupyter-notebook - 如何从我的终端启动 jupyter notebook?
- r - 除了监控所有目录,如何知道有一个新文件保存了 n
- sass - 当父级悬停在 SCSS 中时更改子类的定义
- nativescript - 图像未显示在 Android 上的 ActionBar 中
- docker - docker-compose 文件的等效 docker run 命令