Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php dompdf-strong/th标签问题_Php_Laravel_Dompdf - Fatal编程技术网

Php dompdf-strong/th标签问题

Php dompdf-strong/th标签问题,php,laravel,dompdf,Php,Laravel,Dompdf,我有两种不同的字体,一种是普通字体,另一种是粗体。我试图将粗体字体应用于强标记,但忽略了这一点 我对字体的定义如下: @font-face { font-family: boldFont; src: url("{{ asset('fonts/main/font_bold.ttf') }}") format('truetype'); } @font-face { font-family: regularFont; src: url("{{ asset('fonts

我有两种不同的字体,一种是普通字体,另一种是粗体。我试图将粗体字体应用于强标记,但忽略了这一点

我对字体的定义如下:

@font-face {
    font-family: boldFont;
    src: url("{{ asset('fonts/main/font_bold.ttf') }}") format('truetype');
}

@font-face {
    font-family: regularFont;
    src: url("{{ asset('fonts/main/font_regular.ttf') }}") format('truetype');
}
我已经定义了这些样式:

.bold, th, strong {
    font-family: boldFont !important;
}
这适用于p标记,但在我使用strong或th标记时不适用,即使我将类“bold”添加到它们:

<p class="bold">This Works</p>
<strong>This is ignored</strong>
<strong class="bold">This is ignored</strong>

这是可行的

这被忽略 这将被忽略
我使用的是barryvdh/LaravelDomPDF版本0.8.5和Laravel5.6


有什么想法吗?提前感谢

您可以添加类blod

这被忽略