模态关闭后文本模糊

时间:2019-11-27 07:12:49

标签: html css angular primeng

嗨,我有一个模态问题,当我从这个模型中打开另一个模型并关闭它时,第一个模态文本模糊。

在打开第二个模态之前

enter image description here

关闭第二个模态后

Problem modal

我的CSS:

.label {
    background-color: lightgrey;
    font-weight: bold;
}

td {
    padding: 10px;
    font-size: 14px;
    border: 1px solid black;
}

和页面代码:

<ng-container *ngIf="event">
    <h3>Просмотр события от {{ event.systemDate | dateTime }}</h3>
    <table>
        <tr>
            <td class="label">
                Дата и время события по часовому поясу организации
            </td>
            <td>
                {{ event.systemDate | dateTime }}
            </td>
            <td class="label">
                Дата и время события по часовому поясу Системы
            </td>
            <td>
                {{ event.systemDate | dateTime }}
            </td>
            <td class="label">
                Кем инициировано
            </td>
            <td>
                {{ event.initiatedBy | initiatorType }}
            </td>
        </tr>
    </table>
</ng-container>

2 个答案:

答案 0 :(得分:1)

我认为这与复合层有关。

如果我是正确的话,请将以下代码添加到表和模式中即可解决该问题。如果那不起作用,也尝试将其添加到身体中。随便乱玩!

-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1.0, 1.0);

查看此答案:https://stackoverflow.com/a/19211952/3412847

答案 1 :(得分:0)

问题是由PrimeNG生成的样式引起的:translateX(-50%),translateY(-50%)scale(1)。

enter image description here

我将其添加到styles.scss:

.ui-dialog.ui-dynamicdialog {
    margin-top: -20%;
    margin-left: -40%;
    transform: translateZ(0) scale(1.0, 1.0); !important;
}

我的问题已解决 enter image description here