与Chrome的模态对话框中的不可见文本

时间:2016-08-19 11:22:45

标签: html css google-chrome fonts invisible

我正在处理我目前正在处理的项目中的问题。我有一系列用CSS(显示:固定)制作的模态对话框,默认情况下隐藏了display:none;。在Chrome中,打开这些对话框时,所有文本都是不可见的(我可以选择它,但它不可见)。使用检查器,我可以更改例如它的字体粗细,然后文本将可见,即使恢复到其原始字体粗细。我使用使用以下CSS代码导入的自定义字体(MuseoSans):

@font-face {
    font-family: "MuseoSans";
    font-style: normal;
    font-weight: 100;
    src: url("../fonts/MuseoSans_100-webfont.eot?") format("eot"), url("../fonts/MuseoSans_100-webfont.woff") format("woff"), url("../fonts/MuseoSans_100-webfont.ttf") format("truetype"), url("../fonts/MuseoSans_100-webfont.svg#MuseoSans") format("svg"); }
@font-face {
    font-family: "MuseoSans";
    font-style: normal;
    font-weight: 300;
    src: url("../fonts/MuseoSans_100-webfont.eot?") format("eot"), url("../fonts/MuseoSans_100-webfont.woff") format("woff"), url("../fonts/MuseoSans_100-webfont.ttf") format("truetype"), url("../fonts/MuseoSans_100-webfont.svg#MuseoSans") format("svg"); }

我发现如果在这些对话框中我切换到font-family:Verdana;例如,文本将始终可见。有任何想法吗?我只能在Google Chrome中重现此行为(52.0.2743.116(Build oficial)m(32位))。

编辑:发现如果在打开模态对话框之前在可见位置渲染字体大小和重量,它的工作原理应该是正确的。

0 个答案:

没有答案